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

Method drag_pan

lib/matplotlib/colorbar.py:1347–1354  ·  view source on GitHub ↗
(self, button, key, x, y)

Source from the content-addressed store, hash-verified

1345 self.norm.vmin, self.norm.vmax = new_ybound
1346
1347 def drag_pan(self, button, key, x, y):
1348 # docstring inherited
1349 points = self.ax._get_pan_points(button, key, x, y)
1350 if points is not None:
1351 if self.orientation == 'horizontal':
1352 self.norm.vmin, self.norm.vmax = points[:, 0]
1353 elif self.orientation == 'vertical':
1354 self.norm.vmin, self.norm.vmax = points[:, 1]
1355
1356
1357ColorbarBase = Colorbar # Backcompat API

Callers 1

_mouse_moveMethod · 0.45

Calls 1

_get_pan_pointsMethod · 0.80

Tested by

no test coverage detected