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

Method draw

lib/matplotlib/offsetbox.py:374–385  ·  view source on GitHub ↗

Update the location of children if necessary and draw them to the given *renderer*.

(self, renderer)

Source from the content-addressed store, hash-verified

372 return bbox.translated(px, py)
373
374 def draw(self, renderer):
375 """
376 Update the location of children if necessary and draw them
377 to the given *renderer*.
378 """
379 bbox, offsets = self._get_bbox_and_child_offsets(renderer)
380 px, py = self.get_offset(bbox, renderer)
381 for c, (ox, oy) in zip(self.get_visible_children(), offsets):
382 c.set_offset((px + ox, py + oy))
383 c.draw(renderer)
384 _bbox_artist(self, renderer, fill=False, props=dict(pad=0.))
385 self.stale = False
386
387
388class PackerBase(OffsetBox):

Callers

nothing calls this directly

Calls 6

get_offsetMethod · 0.95
get_visible_childrenMethod · 0.95
_bbox_artistFunction · 0.85
set_offsetMethod · 0.45
drawMethod · 0.45

Tested by

no test coverage detected