MCPcopy Create free account
hub / github.com/ColdGrub1384/Pyto / __init__

Method __init__

site-packages/matplotlib/widgets.py:269–366  ·  view source on GitHub ↗

Parameters ---------- ax : Axes The Axes to put the slider in. label : str Slider label. valmin : float The minimum value of the slider. valmax : float The maximum value of the slider. valini

(self, ax, label, valmin, valmax, valinit=0.5, valfmt='%1.2f',
                 closedmin=True, closedmax=True, slidermin=None,
                 slidermax=None, dragging=True, valstep=None, **kwargs)

Source from the content-addressed store, hash-verified

267 Slider value.
268 """
269 def __init__(self, ax, label, valmin, valmax, valinit=0.5, valfmt='%1.2f',
270 closedmin=True, closedmax=True, slidermin=None,
271 slidermax=None, dragging=True, valstep=None, **kwargs):
272 """
273 Parameters
274 ----------
275 ax : Axes
276 The Axes to put the slider in.
277
278 label : str
279 Slider label.
280
281 valmin : float
282 The minimum value of the slider.
283
284 valmax : float
285 The maximum value of the slider.
286
287 valinit : float, optional, default: 0.5
288 The slider initial position.
289
290 valfmt : str, optional, default: "%1.2f"
291 Used to format the slider value, fprint format string.
292
293 closedmin : bool, optional, default: True
294 Indicate whether the slider interval is closed on the bottom.
295
296 closedmax : bool, optional, default: True
297 Indicate whether the slider interval is closed on the top.
298
299 slidermin : Slider, optional, default: None
300 Do not allow the current slider to have a value less than
301 the value of the Slider `slidermin`.
302
303 slidermax : Slider, optional, default: None
304 Do not allow the current slider to have a value greater than
305 the value of the Slider `slidermax`.
306
307 dragging : bool, optional, default: True
308 If True the slider can be dragged by the mouse.
309
310 valstep : float, optional, default: None
311 If given, the slider will snap to multiples of `valstep`.
312
313 Notes
314 -----
315 Additional kwargs are passed on to ``self.poly`` which is the
316 :class:`~matplotlib.patches.Rectangle` that draws the slider
317 knob. See the :class:`~matplotlib.patches.Rectangle` documentation for
318 valid property names (e.g., `facecolor`, `edgecolor`, `alpha`).
319 """
320 AxesWidget.__init__(self, ax)
321
322 if slidermin is not None and not hasattr(slidermin, 'val'):
323 raise ValueError("Argument slidermin ({}) has no 'val'"
324 .format(type(slidermin)))
325 if slidermax is not None and not hasattr(slidermax, 'val'):
326 raise ValueError("Argument slidermax ({}) has no 'val'"

Callers

nothing calls this directly

Calls 13

_value_in_boundsMethod · 0.95
set_valMethod · 0.95
hasattrFunction · 0.85
axvspanMethod · 0.80
axvlineMethod · 0.80
set_yticksMethod · 0.80
set_xticksMethod · 0.80
set_navigateMethod · 0.80
connect_eventMethod · 0.80
__init__Method · 0.45
formatMethod · 0.45
set_xlimMethod · 0.45

Tested by

no test coverage detected