MCPcopy Create free account
hub / github.com/ColdGrub1384/Pyto / draw

Method draw

site-packages/matplotlib/offsetbox.py:1164–1185  ·  view source on GitHub ↗

draw the artist

(self, renderer)

Source from the content-addressed store, hash-verified

1162 self.patch.set_mutation_scale(fontsize)
1163
1164 def draw(self, renderer):
1165 "draw the artist"
1166
1167 if not self.get_visible():
1168 return
1169
1170 fontsize = renderer.points_to_pixels(self.prop.get_size_in_points())
1171 self._update_offset_func(renderer, fontsize)
1172
1173 if self._drawFrame:
1174 # update the location and size of the legend
1175 bbox = self.get_window_extent(renderer)
1176 self.update_frame(bbox, fontsize)
1177 self.patch.draw(renderer)
1178
1179 width, height, xdescent, ydescent = self.get_extent(renderer)
1180
1181 px, py = self.get_offset(width, height, xdescent, ydescent, renderer)
1182
1183 self.get_child().set_offset((px, py))
1184 self.get_child().draw(renderer)
1185 self.stale = False
1186
1187 def _get_anchored_bbox(self, loc, bbox, parentbbox, borderpad):
1188 """

Callers

nothing calls this directly

Calls 11

_update_offset_funcMethod · 0.95
get_window_extentMethod · 0.95
update_frameMethod · 0.95
get_extentMethod · 0.95
get_childMethod · 0.95
get_visibleMethod · 0.80
get_size_in_pointsMethod · 0.80
points_to_pixelsMethod · 0.45
drawMethod · 0.45
get_offsetMethod · 0.45
set_offsetMethod · 0.45

Tested by

no test coverage detected