MCPcopy Index your code
hub / github.com/matplotlib/matplotlib / on_changed

Method on_changed

lib/matplotlib/widgets.py:634–649  ·  view source on GitHub ↗

Connect *func* as callback function to changes of the slider value. Parameters ---------- func : callable Function to call when slider is changed. The function must accept a single float as its arguments. Returns -------

(self, func)

Source from the content-addressed store, hash-verified

632 self._observers.process('changed', val)
633
634 def on_changed(self, func):
635 """
636 Connect *func* as callback function to changes of the slider value.
637
638 Parameters
639 ----------
640 func : callable
641 Function to call when slider is changed.
642 The function must accept a single float as its arguments.
643
644 Returns
645 -------
646 int
647 Connection id (which can be used to disconnect *func*).
648 """
649 return self._observers.connect('changed', lambda val: func(val))
650
651
652class RangeSlider(SliderBase):

Callers 4

__init__Method · 0.95
range_slider.pyFile · 0.45
slider_demo.pyFile · 0.45

Calls 2

funcFunction · 0.50
connectMethod · 0.45

Tested by

no test coverage detected