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

Method on_clicked

lib/matplotlib/widgets.py:291–297  ·  view source on GitHub ↗

Connect the callback function *func* to button click events. Returns a connection id, which can be used to disconnect the callback.

(self, func)

Source from the content-addressed store, hash-verified

289 self.canvas.draw()
290
291 def on_clicked(self, func):
292 """
293 Connect the callback function *func* to button click events.
294
295 Returns a connection id, which can be used to disconnect the callback.
296 """
297 return self._observers.connect('clicked', lambda event: func(event))
298
299 def disconnect(self, cid):
300 """Remove the callback function with connection id *cid*."""

Callers 9

__init__Method · 0.45
test_CheckButtonsFunction · 0.45
test__buttons_callbacksFunction · 0.45
buttons.pyFile · 0.45
slider_demo.pyFile · 0.45
check_buttons.pyFile · 0.45
radio_buttons.pyFile · 0.45

Calls 2

funcFunction · 0.50
connectMethod · 0.45

Tested by 2

test_CheckButtonsFunction · 0.36
test__buttons_callbacksFunction · 0.36