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

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

.. _sphx_glr_gallery_userdemo_anchored_box01.py:


==============
Anchored Box01
==============





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





.. code-block:: python

    import matplotlib.pyplot as plt
    from matplotlib.offsetbox import AnchoredText


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

    at = AnchoredText("Figure 1a",
                      prop=dict(size=15), frameon=True, loc='upper left')
    at.patch.set_boxstyle("round,pad=0.,rounding_size=0.2")
    ax.add_artist(at)

    plt.show()


.. _sphx_glr_download_gallery_userdemo_anchored_box01.py:


.. only :: html

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



  .. container:: sphx-glr-download

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



  .. container:: sphx-glr-download

     :download:`Download Jupyter notebook: anchored_box01.ipynb <anchored_box01.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>`_
