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

Function draw_text

galleries/examples/misc/anchored_artists.py:25–30  ·  view source on GitHub ↗

Draw a text-box anchored to the upper-left corner of the figure.

(ax)

Source from the content-addressed store, hash-verified

23
24
25def draw_text(ax):
26 """Draw a text-box anchored to the upper-left corner of the figure."""
27 box = AnchoredOffsetbox(child=TextArea("Figure 1a"),
28 loc="upper left", frameon=True)
29 box.patch.set_boxstyle("round,pad=0.,rounding_size=0.2")
30 ax.add_artist(box)
31
32
33def draw_circles(ax):

Callers 1

Calls 4

AnchoredOffsetboxClass · 0.90
TextAreaClass · 0.90
set_boxstyleMethod · 0.80
add_artistMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…