@staticmethod
def _update_xlims(ax, xmin, xmax):
    """
        Calling ``ax.set_xlim(xmin, xmax)`` triggers the callback functor, so
        the limits can't be updated that way within the functor (it causes an
        infinite recursion). This updates the values directly, avoiding the
        loop.
        """
    ax.viewLim.x0 = xmin
    ax.viewLim.x1 = xmax
