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

Method on_pick

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

Source from the content-addressed store, hash-verified

1603 self.canvas.draw()
1604
1605 def on_pick(self, evt):
1606 if self._check_still_parented():
1607 if evt.artist == self.ref_artist:
1608 self.mouse_x = evt.mouseevent.x
1609 self.mouse_y = evt.mouseevent.y
1610 self.save_offset()
1611 self.got_artist = True
1612 if self.got_artist and self._use_blit:
1613 self.ref_artist.set_animated(True)
1614 self.canvas.draw()
1615 fig = self.ref_artist.get_figure(root=False)
1616 self.background = self.canvas.copy_from_bbox(fig.bbox)
1617 self.ref_artist.draw(fig._get_renderer())
1618 self.canvas.blit()
1619
1620 def on_release(self, event):
1621 if self._check_still_parented() and self.got_artist:

Callers

nothing calls this directly

Calls 8

_check_still_parentedMethod · 0.95
save_offsetMethod · 0.95
set_animatedMethod · 0.45
drawMethod · 0.45
get_figureMethod · 0.45
copy_from_bboxMethod · 0.45
_get_rendererMethod · 0.45
blitMethod · 0.45

Tested by

no test coverage detected