Draw two text-boxes, anchored by different corners to the upper-left corner of the figure.
(ax)
| 13 | |
| 14 | |
| 15 | def draw_text(ax): |
| 16 | """ |
| 17 | Draw two text-boxes, anchored by different corners to the upper-left |
| 18 | corner of the figure. |
| 19 | """ |
| 20 | from matplotlib.offsetbox import AnchoredText |
| 21 | at = AnchoredText("Figure 1a", |
| 22 | loc='upper left', prop=dict(size=8), frameon=True, |
| 23 | ) |
| 24 | at.patch.set_boxstyle("round,pad=0.,rounding_size=0.2") |
| 25 | ax.add_artist(at) |
| 26 | |
| 27 | at2 = AnchoredText("Figure 1(b)", |
| 28 | loc='lower left', prop=dict(size=8), frameon=True, |
| 29 | bbox_to_anchor=(0., 1.), |
| 30 | bbox_transform=ax.transAxes |
| 31 | ) |
| 32 | at2.patch.set_boxstyle("round,pad=0.,rounding_size=0.2") |
| 33 | ax.add_artist(at2) |
| 34 | |
| 35 | |
| 36 | def draw_circle(ax): |
no test coverage detected
searching dependent graphs…