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

Method draw

lib/matplotlib/text.py:2205–2222  ·  view source on GitHub ↗
(self, renderer)

Source from the content-addressed store, hash-verified

2203
2204 @artist.allow_rasterization
2205 def draw(self, renderer):
2206 # docstring inherited
2207 if renderer is not None:
2208 self._renderer = renderer
2209 if not self.get_visible() or not self._check_xy(renderer):
2210 return
2211 # Update text positions before `Text.draw` would, so that the
2212 # FancyArrowPatch is correctly positioned.
2213 self.update_positions(renderer)
2214 self.update_bbox_position_size(renderer)
2215 if self.arrow_patch is not None: # FancyArrowPatch
2216 if (self.arrow_patch.get_figure(root=False) is None and
2217 (fig := self.get_figure(root=False)) is not None):
2218 self.arrow_patch.set_figure(fig)
2219 self.arrow_patch.draw(renderer)
2220 # Draw text, including FancyBboxPatch, after FancyArrowPatch.
2221 # Otherwise, a wedge arrowstyle can land partly on top of the Bbox.
2222 Text.draw(self, renderer)
2223
2224 def get_window_extent(self, renderer=None):
2225 # docstring inherited

Calls 7

update_positionsMethod · 0.95
get_visibleMethod · 0.45
_check_xyMethod · 0.45
get_figureMethod · 0.45
set_figureMethod · 0.45
drawMethod · 0.45