@@ -1948,19 +1948,19 @@ class SpanSelector(_SelectorWidget):
1948
1948
Whether to draw a set of handles that allow interaction with the
1949
1949
widget after it is drawn.
1950
1950
1951
- button : `.MouseButton` or list of `.MouseButton`
1951
+ button : `.MouseButton` or list of `.MouseButton`, default: all buttons
1952
1952
The mouse buttons which activate the span selector.
1953
1953
1954
- line_props : dict, default: None
1955
- Line properties with which the interactive line are drawn . Only used
1956
- when *interactive* is True. See `matplotlib.lines.Line2D` for details
1957
- on valid properties.
1954
+ handle_props : dict, default: None
1955
+ Properties of the handle lines at the edges of the span . Only used
1956
+ when *interactive* is True. See `~ matplotlib.lines.Line2D` for valid
1957
+ properties.
1958
1958
1959
- maxdist : float, default: 10
1959
+ handle_grab_distance : float, default: 10
1960
1960
Distance in pixels within which the interactive tool handles can be
1961
1961
activated.
1962
1962
1963
- drag_from_anywhere : bool, optional
1963
+ drag_from_anywhere : bool, default: False
1964
1964
If `True`, the widget can be moved by clicking anywhere within
1965
1965
its bounds.
1966
1966
@@ -1983,7 +1983,7 @@ class SpanSelector(_SelectorWidget):
1983
1983
@_api .rename_parameter ("3.5" , "span_stays" , "interactive" )
1984
1984
def __init__ (self , ax , onselect , direction , minspan = 0 , useblit = False ,
1985
1985
rectprops = None , onmove_callback = None , interactive = False ,
1986
- button = None , line_props = None , maxdist = 10 ,
1986
+ button = None , handle_props = None , handle_grab_distance = 10 ,
1987
1987
drag_from_anywhere = False ):
1988
1988
1989
1989
super ().__init__ (ax , onselect , useblit = useblit , button = button )
@@ -2007,7 +2007,7 @@ def __init__(self, ax, onselect, direction, minspan=0, useblit=False,
2007
2007
self .onmove_callback = onmove_callback
2008
2008
self .minspan = minspan
2009
2009
2010
- self .maxdist = maxdist
2010
+ self .handle_grab_distance = handle_grab_distance
2011
2011
self ._interactive = interactive
2012
2012
self .drag_from_anywhere = drag_from_anywhere
2013
2013
@@ -2018,7 +2018,7 @@ def __init__(self, ax, onselect, direction, minspan=0, useblit=False,
2018
2018
2019
2019
# Setup handles
2020
2020
props = dict (color = rectprops .get ('facecolor' , 'r' ))
2021
- props .update (cbook .normalize_kwargs (line_props , Line2D ._alias_map ))
2021
+ props .update (cbook .normalize_kwargs (handle_props , Line2D ._alias_map ))
2022
2022
2023
2023
if self ._interactive :
2024
2024
self ._edge_order = ['min' , 'max' ]
@@ -2211,7 +2211,7 @@ def _set_active_handle(self, event):
2211
2211
# Use 'C' to match the notation used in the RectangleSelector
2212
2212
if 'move' in self .state :
2213
2213
self ._active_handle = 'C'
2214
- elif e_dist > self .maxdist :
2214
+ elif e_dist > self .handle_grab_distance :
2215
2215
# Not close to any handles
2216
2216
self ._active_handle = None
2217
2217
if self .drag_from_anywhere and self ._contains (event ):
0 commit comments