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

Method on_motion

lib/matplotlib/offsetbox.py:1592–1603  ·  view source on GitHub ↗
(self, evt)

Source from the content-addressed store, hash-verified

1590 disconnect.args[0] for disconnect in self._disconnectors[:2]])
1591
1592 def on_motion(self, evt):
1593 if self._check_still_parented() and self.got_artist:
1594 dx = evt.x - self.mouse_x
1595 dy = evt.y - self.mouse_y
1596 self.update_offset(dx, dy)
1597 if self._use_blit:
1598 self.canvas.restore_region(self.background)
1599 self.ref_artist.draw(
1600 self.ref_artist.get_figure(root=True)._get_renderer())
1601 self.canvas.blit()
1602 else:
1603 self.canvas.draw()
1604
1605 def on_pick(self, evt):
1606 if self._check_still_parented():

Callers

nothing calls this directly

Calls 7

_check_still_parentedMethod · 0.95
update_offsetMethod · 0.95
restore_regionMethod · 0.45
drawMethod · 0.45
_get_rendererMethod · 0.45
get_figureMethod · 0.45
blitMethod · 0.45

Tested by

no test coverage detected