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

Function toggle_selector

galleries/examples/widgets/rectangle_selector.py:31–41  ·  view source on GitHub ↗
(event)

Source from the content-addressed store, hash-verified

29
30
31def toggle_selector(event):
32 print('Key pressed.')
33 if event.key == 't':
34 for selector in selectors:
35 name = type(selector).__name__
36 if selector.active:
37 print(f'{name} deactivated.')
38 selector.set_active(False)
39 else:
40 print(f'{name} activated.')
41 selector.set_active(True)
42
43
44fig = plt.figure(layout='constrained')

Callers

nothing calls this directly

Calls 1

set_activeMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…