Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 6312409

Browse files
author
Joshua Stevenson
committed
SpanSelector widget: Improve doc for extents
1 parent 07a6f66 commit 6312409

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

lib/matplotlib/widgets.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2695,7 +2695,7 @@ def _press(self, event):
26952695

26962696
@property
26972697
def direction(self):
2698-
"""Direction of the span selector: 'vertical' or 'horizontal'."""
2698+
"""Direction of the span selector: 'vertical' or 'horizontal'. Writable."""
26992699
return self._direction
27002700

27012701
@direction.setter
@@ -2855,7 +2855,12 @@ def _snap(values, snap_values):
28552855

28562856
@property
28572857
def extents(self):
2858-
"""Return extents of the span selector."""
2858+
"""
2859+
(float, float)
2860+
The axis values for the start and end points of the current selection.
2861+
If there is no selection then the start and end values will be the same.
2862+
Writable.
2863+
"""
28592864
if self.direction == 'horizontal':
28602865
vmin = self._selection_artist.get_x()
28612866
vmax = vmin + self._selection_artist.get_width()

0 commit comments

Comments
 (0)