def get_ordered_axes(fig):
    """
    Get the axes from a figure, which may or may not have been modified by
    pyrolite functions. This ensures that ordering is preserved.
    """
    if hasattr(fig, 'orderedaxes'):
        axes = fig.orderedaxes
    else:
        axes = fig.axes
    return axes
