.. note::
    :class: sphx-glr-download-link-note

    Click :ref:`here <sphx_glr_download_gallery_userdemo_anchored_box02.py>` to download the full example code
.. rst-class:: sphx-glr-example-title

.. _sphx_glr_gallery_userdemo_anchored_box02.py:


==============
Anchored Box02
==============





.. image:: /gallery/userdemo/images/sphx_glr_anchored_box02_001.png
    :class: sphx-glr-single-img





.. code-block:: python

    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='upper right', 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()


.. _sphx_glr_download_gallery_userdemo_anchored_box02.py:


.. only :: html

 .. container:: sphx-glr-footer
    :class: sphx-glr-footer-example



  .. container:: sphx-glr-download

     :download:`Download Python source code: anchored_box02.py <anchored_box02.py>`



  .. container:: sphx-glr-download

     :download:`Download Jupyter notebook: anchored_box02.ipynb <anchored_box02.ipynb>`


.. only:: html

 .. rst-class:: sphx-glr-signature

    Keywords: matplotlib code example, codex, python plot, pyplot
    `Gallery generated by Sphinx-Gallery
    <https://sphinx-gallery.readthedocs.io>`_
