You are reading an old version of the documentation (v2.1.0). For the latest version see https://matplotlib.org/stable/gallery/userdemo/anchored_box02.html
matplotlib
Fork me on GitHub


Travis-CI:

Related Topics

This Page

Anchored Box02ΒΆ

../../_images/sphx_glr_anchored_box02_001.png
from matplotlib.patches import Circle
import matplotlib.pyplot as plt
from mpl_toolkits.axes_grid1.anchored_artists import AnchoredDrawingArea


fig, ax = plt.subplots(figsize=(3, 3))

ada = AnchoredDrawingArea(40, 20, 0, 0,
                          loc=1, pad=0., frameon=False)
p1 = Circle((10, 10), 10)
ada.drawing_area.add_artist(p1)
p2 = Circle((30, 10), 5, fc="r")
ada.drawing_area.add_artist(p2)

ax.add_artist(ada)

plt.show()

Total running time of the script: ( 0 minutes 0.017 seconds)

Gallery generated by Sphinx-Gallery