def ax2prop(axlims, n):
    """
    axlims should be provided as result of ax.get_xlims()
    n should be a list of values to convert
    """
    axrange = axlims[1] - axlims[0]
    output = []
    for n in n:
        output.append((n - axlims[0])/axrange)
        
    return output