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

Method enable

lib/matplotlib/backend_tools.py:650–658  ·  view source on GitHub ↗

Connect press/release events and lock the canvas.

(self, event=None)

Source from the content-addressed store, hash-verified

648 self.lastscroll = time.time()-self.scrollthresh
649
650 def enable(self, event=None):
651 """Connect press/release events and lock the canvas."""
652 self.figure.canvas.widgetlock(self)
653 self._idPress = self.figure.canvas.mpl_connect(
654 'button_press_event', self._press)
655 self._idRelease = self.figure.canvas.mpl_connect(
656 'button_release_event', self._release)
657 self._idScroll = self.figure.canvas.mpl_connect(
658 'scroll_event', self.scroll_zoom)
659
660 def disable(self, event=None):
661 """Release the canvas and disconnect press/release events."""

Callers 1

nbagg_mpl.jsFile · 0.45

Calls 1

mpl_connectMethod · 0.80

Tested by

no test coverage detected