def get_label_pixel(ax):
    """
    Method that return the bouding box of the labels.
    Inputs:
    ax : (matplotlib obj) Matplotlib object of the axes of the plot
    Outputs:
    x_label_bounds, y_label_bounds (list, list) : list of bounding boxes for each labels.
    """

    x_label_bounds = [ textobj.get_window_extent() for textobj in ax.get_xticklabels() if len(textobj.get_text())>0]
    y_label_bounds = [ textobj.get_window_extent() for textobj in ax.get_yticklabels() if len(textobj.get_text())>0]

    return x_label_bounds, y_label_bounds