diff --git a/lib/matplotlib/widgets.py b/lib/matplotlib/widgets.py index f551abad778c..cb07d8461c82 100644 --- a/lib/matplotlib/widgets.py +++ b/lib/matplotlib/widgets.py @@ -141,22 +141,18 @@ class Button(AxesWidget): A GUI neutral button. For the button to remain responsive you must keep a reference to it. + Call :meth:`on_clicked` to connect to the button. - The following attributes are accessible - - *ax* + Attributes + ---------- + ax : The :class:`matplotlib.axes.Axes` the button renders into. - - *label* + label : A :class:`matplotlib.text.Text` instance. - - *color* + color : The color of the button when not hovering. - - *hovercolor* + hovercolor : The color of the button when hovering. - - Call :meth:`on_clicked` to connect to the button """ def __init__(self, ax, label, image=None, @@ -2451,7 +2447,8 @@ def _rect_bbox(self): class LassoSelector(_SelectorWidget): - """Selection curve of an arbitrary shape. + """ + Selection curve of an arbitrary shape. For the selector to remain responsive you must keep a reference to it. @@ -2464,14 +2461,6 @@ class LassoSelector(_SelectorWidget): similar to :class:`RectangleSelector` and :class:`SpanSelector` and will continue to interact with the axes until disconnected. - Parameters: - - *ax* : :class:`~matplotlib.axes.Axes` - The parent axes for the widget. - *onselect* : function - Whenever the lasso is released, the `onselect` function is called and - passed the vertices of the selected path. - Example usage:: ax = subplot(111) @@ -2481,15 +2470,24 @@ def onselect(verts): print(verts) lasso = LassoSelector(ax, onselect) - *button* is a list of integers indicating which mouse buttons should - be used for rectangle selection. You can also specify a single - integer if only a single button is desired. Default is *None*, - which does not limit which button can be used. + Parameters + ---------- + ax : :class:`~matplotlib.axes.Axes` + The parent axes for the widget. + onselect : function + Whenever the lasso is released, the *onselect* function is called and + passed the vertices of the selected path. + button : list[Int], optional + A list of integers indicating which mouse buttons should be used for + rectangle selection. You can also specify a single integer if only a + single button is desired. Default is ``None``, which does not limit + which button can be used. Note, typically: - 1 = left mouse button - 2 = center mouse button (scroll wheel) - 3 = right mouse button + + - 1 = left mouse button + - 2 = center mouse button (scroll wheel) + - 3 = right mouse button """ pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy