Skip to content

Commit 9d3e5e1

Browse files
committed
Doc nit.
1 parent ffba7d9 commit 9d3e5e1

File tree

1 file changed

+10
-14
lines changed

1 file changed

+10
-14
lines changed

lib/matplotlib/widgets.py

Lines changed: 10 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -266,7 +266,7 @@ class Slider(AxesWidget):
266266
"""
267267
A slider representing a floating point range.
268268
269-
Create a slider from *valmin* to *valmax* in axes *ax*. For the slider to
269+
Create a slider from `valmin` to `valmax` in axes `ax`. For the slider to
270270
remain responsive you must maintain a reference to it.
271271
272272
Call :meth:`on_changed` to connect to the slider event
@@ -290,8 +290,7 @@ def __init__(self, ax, label, valmin, valmax, valinit=0.5, valfmt='%1.2f',
290290
The maximum value of the slider.
291291
292292
valinit : float, optional
293-
The slider initial position.
294-
Default: 0.5
293+
The slider initial position. Default: 0.5
295294
296295
valfmt : str, optional
297296
Used to format the slider value, fprint format string.
@@ -307,24 +306,21 @@ def __init__(self, ax, label, valmin, valmax, valinit=0.5, valfmt='%1.2f',
307306
308307
slidermin : Slider, optional
309308
Do not allow the current slider to have a value less than
310-
`slidermin.val`.
311-
Default: None
309+
the value of the Slider `slidermin`. Default: None
312310
313311
slidermax : Slider, optional
314312
Do not allow the current slider to have a value greater than
315-
`slidermax.val`.
316-
Default: None
313+
the value of the Slider `slidermax`. Default: None
317314
318315
dragging : bool, optional
319-
If True the slider can be dragged by the mouse.
320-
Default: True
316+
If True the slider can be dragged by the mouse. Default: True
321317
322318
Notes
323-
----------
319+
-----
324320
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*, ...).
321+
:class:`~matplotlib.patches.Rectangle` that draws the slider
322+
knob. See the :class:`~matplotlib.patches.Rectangle` documentation for
323+
valid property names (e.g., `facecolor`, `edgecolor`, `alpha`).
328324
"""
329325
AxesWidget.__init__(self, ax)
330326

@@ -392,7 +388,7 @@ def _value_in_bounds(self, val):
392388
if not self.closedmax:
393389
return
394390
val = self.slidermax.val
395-
self.set_val(val)
391+
return val
396392

397393
def _update(self, event):
398394
"""update the slider position"""

0 commit comments

Comments
 (0)