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

Method get_loc_in_canvas

lib/matplotlib/offsetbox.py:1668–1674  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

1666 self.offsetbox.set_offset(loc_in_canvas)
1667
1668 def get_loc_in_canvas(self):
1669 offsetbox = self.offsetbox
1670 renderer = offsetbox.get_figure(root=True)._get_renderer()
1671 bbox = offsetbox.get_bbox(renderer)
1672 ox, oy = offsetbox._offset
1673 loc_in_canvas = (ox + bbox.x0, oy + bbox.y0)
1674 return loc_in_canvas
1675
1676
1677class DraggableAnnotation(DraggableBase):

Callers 1

finalize_offsetMethod · 0.80

Calls 3

_get_rendererMethod · 0.45
get_figureMethod · 0.45
get_bboxMethod · 0.45

Tested by

no test coverage detected