def label_offsetter(ax, xoffset_axis):
    """Convert an offset in x axis coordinates (e.g. 0 is left side of x axis, 1 is right side)
    to x and y axis offsets in axis coordinates, where both x and y offsets are the same when
    expressed in display (i.e. pixels) coordinates.
    
    Inputs:
        * ax (object) - a matplotlib axis object
        * xoffset_axis (scalar) - how much to offset the label from the x axis in axis coordinates
          (e.g. 1 is the length of the entire x axis).
    
    Examples:
    
    >>> from matplotlib import pyplot
    >>> import numpy
    >>> fig, ax = pyplot.subplots(1, 1) # Create an empty axis
    >>> axis_pixels = ax.transAxes.transform(numpy.array([[0,0], [1, 1]]))
    >>> xpixels, ypixels = axis_pixels[1] - axis_pixels[0]
    >>> xoffset, yoffset = label_offsetter(ax, xoffset_axis = 0.1) # Offset by 10% of x axis dimensions
    >>> yoffset_true = xoffset*(xpixels/ypixels) # expected yoffset
    >>> numpy.allclose(xoffset, 0.1) # xoffset is unchanged from input
    True
    >>> numpy.allclose(yoffset, yoffset_true) # yoffset is 0.129
    True
    """
    x_origin, y_origin = ax.transAxes.transform((0, 0))
    x_display = ax.transAxes.transform((xoffset_axis, y_origin))[0]
    offset = x_display - x_origin
    xoffset_axis, yoffset_axis = ax.transAxes.inverted().transform((offset +
        x_origin, offset + y_origin))
    return xoffset_axis, yoffset_axis
