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

Method pan

lib/matplotlib/backend_bases.py:3175–3189  ·  view source on GitHub ↗

Toggle the pan/zoom tool. Pan with left button, zoom with right.

(self, *args)

Source from the content-addressed store, hash-verified

3173 return axes_to_trigger
3174
3175 def pan(self, *args):
3176 """
3177 Toggle the pan/zoom tool.
3178
3179 Pan with left button, zoom with right.
3180 """
3181 if not self.canvas.widgetlock.available(self):
3182 self.set_message("pan unavailable")
3183 return
3184 if self.mode == _Mode.PAN:
3185 self.mode = _Mode.NONE
3186 self.canvas.widgetlock.release(self)
3187 else:
3188 self.mode = _Mode.PAN
3189 self.canvas.widgetlock(self)
3190
3191 _PanInfo = namedtuple("_PanInfo", "button axes cid")
3192

Callers 6

test_toolbar_zoom_panFunction · 0.95
test_widgetlock_zoompanFunction · 0.95
test_interactive_panFunction · 0.95
key_press_handlerFunction · 0.45

Calls 3

set_messageMethod · 0.95
availableMethod · 0.80
releaseMethod · 0.45

Tested by

no test coverage detected