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

Method on_changed

lib/matplotlib/widgets.py:1016–1031  ·  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 2-tuple of floats as its argument. Returns -------

(self, func)

Source from the content-addressed store, hash-verified

1014 self._observers.process("changed", (vmin, vmax))
1015
1016 def on_changed(self, func):
1017 """
1018 Connect *func* as callback function to changes of the slider value.
1019
1020 Parameters
1021 ----------
1022 func : callable
1023 Function to call when slider is changed. The function
1024 must accept a 2-tuple of floats as its argument.
1025
1026 Returns
1027 -------
1028 int
1029 Connection id (which can be used to disconnect *func*).
1030 """
1031 return self._observers.connect('changed', lambda val: func(val))
1032
1033
1034def _expand_text_props(props):

Callers

nothing calls this directly

Calls 2

funcFunction · 0.50
connectMethod · 0.45

Tested by

no test coverage detected