@@ -73,8 +73,10 @@ class AxesWidget(Widget):
73
73
"""Widget that is connected to a single
74
74
:class:`~matplotlib.axes.Axes`.
75
75
76
- To guarantee that the widgets stay responsive maintain a reference
77
- to them. This is necessary because the callback registry
76
+ To guarantee that the widget remains responsive and not garbage-collected,
77
+ a reference to the object should be maintained by the user.
78
+
79
+ This is necessary because the callback registry
78
80
maintains only weak-refs to the functions, which are member
79
81
functions of the widget. If there are no references to the widget
80
82
object it may be garbage collected which will disconnect the
@@ -123,7 +125,7 @@ class Button(AxesWidget):
123
125
A GUI neutral button.
124
126
125
127
For the button to remain responsive
126
- you much keep a reference to it.
128
+ you must keep a reference to it.
127
129
128
130
The following attributes are accessible
129
131
@@ -294,6 +296,18 @@ def __init__(self, ax, label, valmin, valmax, valinit=0.5, valfmt='%1.2f',
294
296
295
297
Parameters
296
298
----------
299
+ ax : Axes
300
+ The Axes to put the slider in
301
+
302
+ label : str
303
+ Slider label
304
+
305
+ valmin : float
306
+ The minimum value of the slider
307
+
308
+ valmax : float
309
+ The maximum value of the slider
310
+
297
311
valinit : float
298
312
The slider initial position
299
313
@@ -304,13 +318,19 @@ def __init__(self, ax, label, valmin, valmax, valinit=0.5, valfmt='%1.2f',
304
318
Used to format the slider value, fprint format string
305
319
306
320
closedmin : bool
321
+ Indicate whether the slider interval is closed on the bottom
322
+
307
323
closedmax : bool
308
- Indicate whether the slider interval is closed
324
+ Indicate whether the slider interval is closed on the top
325
+
326
+ slidermin : Slider or None
327
+ Do not allow the current slider to have a value less than
328
+ `slidermin`
329
+
330
+ slidermax : Slider or None
331
+ Do not allow the current slider to have a value greater than
332
+ `slidermax`
309
333
310
- slidermin : float
311
- slidermax : float
312
- Used to constrain the value of this slider to the values
313
- of other sliders.
314
334
315
335
dragging : bool
316
336
if the silder can be dragged by the mouse
@@ -949,7 +969,7 @@ class MultiCursor(Widget):
949
969
Provide a vertical (default) and/or horizontal line cursor shared between
950
970
multiple axes.
951
971
952
- For the cursor to remain responsive you much keep a reference to
972
+ For the cursor to remain responsive you much keep a reference to
953
973
it.
954
974
955
975
Example usage::
0 commit comments