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

Method drag_pan

lib/matplotlib/axes/_base.py:4593–4613  ·  view source on GitHub ↗

Called when the mouse moves during a pan operation. Parameters ---------- button : `.MouseButton` The pressed mouse button. key : str or None The pressed key, if any. x, y : float The mouse coordinates in display c

(self, button, key, x, y)

Source from the content-addressed store, hash-verified

4591 return points
4592
4593 def drag_pan(self, button, key, x, y):
4594 """
4595 Called when the mouse moves during a pan operation.
4596
4597 Parameters
4598 ----------
4599 button : `.MouseButton`
4600 The pressed mouse button.
4601 key : str or None
4602 The pressed key, if any.
4603 x, y : float
4604 The mouse coordinates in display coords.
4605
4606 Notes
4607 -----
4608 This is intended to be overridden by new projection types.
4609 """
4610 points = self._get_pan_points(button, key, x, y)
4611 if points is not None:
4612 self.set_xlim(points[:, 0])
4613 self.set_ylim(points[:, 1])
4614
4615 def _get_data_children(self):
4616 """

Callers

nothing calls this directly

Calls 3

_get_pan_pointsMethod · 0.95
set_xlimMethod · 0.95
set_ylimMethod · 0.95

Tested by

no test coverage detected