

    To guarantee that the selector remains responsive, keep a reference to it.

    In order to turn off the SpanSelector, set `span_selector.active=False`. To
    turn it back on, set `span_selector.active=True`.

    Parameters
    ----------
    ax :  :class:`matplotlib.axes.Axes` object

    onselect : func(min, max), min/max are floats

    direction : "horizontal" or "vertical"
      The axis along which to draw the span selector

    minspan : float, default is None
     If selection is less than *minspan*, do not call *onselect*

    useblit : bool, default is False
      If True, use the backend-dependent blitting features for faster
      canvas updates.

    rectprops : dict, default is None
      Dictionary of :class:`matplotlib.patches.Patch` properties

    onmove_callback : func(min, max), min/max are floats, default is None
      Called on mouse move while the span is being selected

    span_stays : bool, default is False
      If True, the span stays visible after the mouse is released

    button : int or list of ints
      Determines which mouse buttons activate the span selector
        1 = left mouse button

        2 = center mouse button (scroll wheel)

        3 = right mouse button


    Examples
    --------
    >>> import matplotlib.pyplot as plt
    >>> import matplotlib.widgets as mwidgets
    >>> fig, ax = plt.subplots()
    >>> ax.plot([1, 2, 3], [10, 50, 100])
    >>> def onselect(vmin, vmax):
            print(vmin, vmax)
    >>> rectprops = dict(facecolor='blue', alpha=0.5)
    >>> span = mwidgets.SpanSelector(ax, onselect, 'horizontal',
                                     rectprops=rectprops)
    >>> fig.show()

    See also: :ref:`sphx_glr_gallery_widgets_span_selector.py`

    NFc
