@@ -266,91 +266,65 @@ class Slider(AxesWidget):
266
266
"""
267
267
A slider representing a floating point range.
268
268
269
- For the slider to remain responsive you must maintain a
270
- reference to it.
271
-
272
- The following attributes are defined
273
- *ax* : the slider :class:`matplotlib.axes.Axes` instance
274
-
275
- *val* : the current slider value
276
-
277
- *vline* : a :class:`matplotlib.lines.Line2D` instance
278
- representing the initial value of the slider
279
-
280
- *poly* : A :class:`matplotlib.patches.Polygon` instance
281
- which is the slider knob
282
-
283
- *valfmt* : the format string for formatting the slider text
284
-
285
- *label* : a :class:`matplotlib.text.Text` instance
286
- for the slider label
287
-
288
- *closedmin* : whether the slider is closed on the minimum
289
-
290
- *closedmax* : whether the slider is closed on the maximum
291
-
292
- *slidermin* : another slider - if not *None*, this slider must be
293
- greater than *slidermin*
294
-
295
- *slidermax* : another slider - if not *None*, this slider must be
296
- less than *slidermax*
297
-
298
- *dragging* : allow for mouse dragging on slider
269
+ Create a slider from *valmin* to *valmax* in axes *ax*. For the slider to
270
+ remain responsive you must maintain a reference to it.
299
271
300
272
Call :meth:`on_changed` to connect to the slider event
301
273
"""
302
274
def __init__ (self , ax , label , valmin , valmax , valinit = 0.5 , valfmt = '%1.2f' ,
303
275
closedmin = True , closedmax = True , slidermin = None ,
304
276
slidermax = None , dragging = True , ** kwargs ):
305
277
"""
306
- Create a slider from *valmin* to *valmax* in axes *ax*.
307
-
308
- Additional kwargs are passed on to ``self.poly`` which is the
309
- :class:`matplotlib.patches.Rectangle` that draws the slider
310
- knob. See the :class:`matplotlib.patches.Rectangle` documentation for
311
- valid property names (e.g., *facecolor*, *edgecolor*, *alpha*, ...).
312
-
313
278
Parameters
314
279
----------
315
280
ax : Axes
316
- The Axes to put the slider in
281
+ The Axes to put the slider in.
317
282
318
283
label : str
319
- Slider label
284
+ Slider label.
320
285
321
286
valmin : float
322
- The minimum value of the slider
287
+ The minimum value of the slider.
323
288
324
289
valmax : float
325
- The maximum value of the slider
326
-
327
- valinit : float
328
- The slider initial position
290
+ The maximum value of the slider.
329
291
330
- label : str
331
- The slider label
292
+ valinit : float, optional
293
+ The slider initial position.
294
+ Default: 0.5
332
295
333
- valfmt : str
334
- Used to format the slider value, fprint format string
296
+ valfmt : str, optional
297
+ Used to format the slider value, fprint format string.
298
+ Default: '%1.2f'
335
299
336
- closedmin : bool
337
- Indicate whether the slider interval is closed on the bottom
300
+ closedmin : bool, optional
301
+ Indicate whether the slider interval is closed on the bottom.
302
+ Default: True
338
303
339
- closedmax : bool
340
- Indicate whether the slider interval is closed on the top
304
+ closedmax : bool, optional
305
+ Indicate whether the slider interval is closed on the top.
306
+ Default: True
341
307
342
- slidermin : Slider or None
308
+ slidermin : Slider, optional
343
309
Do not allow the current slider to have a value less than
344
- `slidermin`
310
+ `slidermin.val`.
311
+ Default: None
345
312
346
- slidermax : Slider or None
313
+ slidermax : Slider, optional
347
314
Do not allow the current slider to have a value greater than
348
- `slidermax`
315
+ `slidermax.val`.
316
+ Default: None
349
317
318
+ dragging : bool, optional
319
+ If True the slider can be dragged by the mouse.
320
+ Default: True
350
321
351
- dragging : bool
352
- if the slider can be dragged by the mouse
353
-
322
+ Notes
323
+ ----------
324
+ Additional kwargs are passed on to ``self.poly`` which is the
325
+ :class:`matplotlib.patches.Rectangle` that draws the slider
326
+ knob. See the :class:`matplotlib.patches.Rectangle` documentation for
327
+ valid property names (e.g., *facecolor*, *edgecolor*, *alpha*, ...).
354
328
"""
355
329
AxesWidget .__init__ (self , ax )
356
330
0 commit comments