A slider representing a floating point range The following attributes are defined *ax* : the slider :class:`matplotlib.axes.Axes` instance *val* : the current slider value *vline* : a :class:`matplotlib.lines.Line2D` instance repres
| 21 | |
| 22 | |
| 23 | class Slider(AxesWidget): |
| 24 | """ |
| 25 | A slider representing a floating point range |
| 26 | |
| 27 | The following attributes are defined |
| 28 | *ax* : the slider :class:`matplotlib.axes.Axes` instance |
| 29 | |
| 30 | *val* : the current slider value |
| 31 | |
| 32 | *vline* : a :class:`matplotlib.lines.Line2D` instance |
| 33 | representing the initial value of the slider |
| 34 | |
| 35 | *poly* : A :class:`matplotlib.patches.Polygon` instance |
| 36 | which is the slider knob |
| 37 | |
| 38 | *valfmt* : the format string for formatting the slider text |
| 39 | |
| 40 | *label* : a :class:`matplotlib.text.Text` instance |
| 41 | for the slider label |
| 42 | |
| 43 | *closedmin* : whether the slider is closed on the minimum |
| 44 | |
| 45 | *closedmax* : whether the slider is closed on the maximum |
| 46 | |
| 47 | *slidermin* : another slider - if not *None*, this slider must be |
| 48 | greater than *slidermin* |
| 49 | |
| 50 | *slidermax* : another slider - if not *None*, this slider must be |
| 51 | less than *slidermax* |
| 52 | |
| 53 | *drag_enabled* : allow for mouse dragging on slider |
| 54 | |
| 55 | Call :meth:`add_observer` to connect to the slider event |
| 56 | """ |
| 57 | def __init__(self, ax, name, label, valmin, valmax, valinit=0.5, width=1, valfmt='%1.2f', |
| 58 | closedmin=True, closedmax=True, slidermin=None, |
| 59 | slidermax=None, drag_enabled=True, **kwargs): |
| 60 | """ |
| 61 | Create a slider from *valmin* to *valmax* in axes *ax* |
| 62 | |
| 63 | *valinit* |
| 64 | The slider initial position |
| 65 | |
| 66 | *label* |
| 67 | The slider label |
| 68 | |
| 69 | *valfmt* |
| 70 | Used to format the slider value |
| 71 | |
| 72 | *closedmin* and *closedmax* |
| 73 | Indicate whether the slider interval is closed |
| 74 | |
| 75 | *slidermin* and *slidermax* |
| 76 | Used to constrain the value of this slider to the values |
| 77 | of other sliders. |
| 78 | |
| 79 | additional kwargs are passed on to ``self.poly`` which is the |
| 80 | :class:`matplotlib.patches.Rectangle` which draws the slider |
no outgoing calls
no test coverage detected