8000 Merge pull request #10106 from dstansby/lassodoc · matplotlib/matplotlib@b8364c6 · GitHub
[go: up one dir, main page]

Skip to content

Commit b8364c6

Browse files
authored
Merge pull request #10106 from dstansby/lassodoc
DOC: Clean up some widget docstrings
2 parents af2dd7d + 5ad3566 commit b8364c6

File tree

1 file changed

+25
-27
lines changed

1 file changed

+25
-27
lines changed

lib/matplotlib/widgets.py

Lines changed: 25 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -141,22 +141,18 @@ class Button(AxesWidget):
141141
A GUI neutral button.
142142
143143
For the button to remain responsive you must keep a reference to it.
144+
Call :meth:`on_clicked` to connect to the button.
144145
145-
The following attributes are accessible
146-
147-
*ax*
146+
Attributes
147+
----------
148+
ax :
148149
The :class:`matplotlib.axes.Axes` the button renders into.
149-
150-
*label*
150+
label :
151151
A :class:`matplotlib.text.Text` instance.
152-
153-
*color*
152+
color :
154153
The color of the button when not hovering.
155-
156-
*hovercolor*
154+
hovercolor :
157155
The color of the button when hovering.
158-
159-
Call :meth:`on_clicked` to connect to the button
160156
"""
161157

162158
def __init__(self, ax, label, image=None,
@@ -2451,7 +2447,8 @@ def _rect_bbox(self):
24512447

24522448

24532449
class LassoSelector(_SelectorWidget):
2454-
"""Selection curve of an arbitrary shape.
2450+
"""
2451+
Selection curve of an arbitrary shape.
24552452
24562453
For the selector to remain responsive you must keep a reference to
24572454
it.
@@ -2464,14 +2461,6 @@ class LassoSelector(_SelectorWidget):
24642461
similar to :class:`RectangleSelector` and :class:`SpanSelector` and will
24652462
continue to interact with the axes until disconnected.
24662463
2467-
Parameters:
2468-
2469-
*ax* : :class:`~matplotlib.axes.Axes`
2470-
The parent axes for the widget.
2471-
*onselect* : function
2472-
Whenever the lasso is released, the `onselect` function is called and
2473-
passed the vertices of the selected path.
2474-
24752464
Example usage::
24762465
24772466
ax = subplot(111)
@@ -2481,15 +2470,24 @@ def onselect(verts):
24812470
print(verts)
24822471
lasso = LassoSelector(ax, onselect)
24832472
2484-
*button* is a list of integers indicating which mouse buttons should
2485-
be used for rectangle selection. You can also specify a single
2486-
integer if only a single button is desired. Default is *None*,
2487-
which does not limit which button can be used.
2473+
Parameters
2474+
----------
2475+
ax : :class:`~matplotlib.axes.Axes`
2476+
The parent axes for the widget.
2477+
onselect : function
2478+
Whenever the lasso is released, the *onselect* function is called and
2479+
passed the vertices of the selected path.
2480+
button : list[Int], optional
2481+
A list of integers indicating which mouse buttons should be used for
2482+
rectangle selection. You can also specify a single integer if only a
2483+
single button is desired. Default is ``None``, which does not limit
2484+
which button can be used.
24882485
24892486
Note, typically:
2490-
1 = left mouse button
2491-
2 = center mouse button (scroll wheel)
2492-
3 = right mouse button
2487+
2488+
- 1 = left mouse button
2489+
- 2 = center mouse button (scroll wheel)
2490+
- 3 = right mouse button
24932491
24942492
"""
24952493

0 commit comments

Comments
 (0)
0