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

Method draw

site-packages/matplotlib/text.py:2369–2393  ·  view source on GitHub ↗

Draw the :class:`Annotation` object to the given *renderer*.

(self, renderer)

Source from the content-addressed store, hash-verified

2367
2368 @artist.allow_rasterization
2369 def draw(self, renderer):
2370 """
2371 Draw the :class:`Annotation` object to the given *renderer*.
2372 """
2373
2374 if renderer is not None:
2375 self._renderer = renderer
2376 if not self.get_visible():
2377 return
2378
2379 xy_pixel = self._get_position_xy(renderer)
2380 if not self._check_xy(renderer, xy_pixel):
2381 return
2382
2383 self._update_position_xytext(renderer, xy_pixel)
2384 self.update_bbox_position_size(renderer)
2385
2386 if self.arrow_patch is not None: # FancyArrowPatch
2387 if self.arrow_patch.figure is None and self.figure is not None:
2388 self.arrow_patch.figure = self.figure
2389 self.arrow_patch.draw(renderer)
2390
2391 # Draw text, including FancyBboxPatch, after FancyArrowPatch.
2392 # Otherwise, a wedge arrowstyle can land partly on top of the Bbox.
2393 Text.draw(self, renderer)
2394
2395 def get_window_extent(self, renderer=None):
2396 """

Callers

nothing calls this directly

Calls 6

get_visibleMethod · 0.80
_get_position_xyMethod · 0.80
_check_xyMethod · 0.45
drawMethod · 0.45

Tested by

no test coverage detected