

.. _sphx_glr_gallery_userdemo_anchored_box01.py:


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





.. image:: /gallery/userdemo/images/sphx_glr_anchored_box01_001.png
    :align: center





.. 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=2)
    at.patch.set_boxstyle("round,pad=0.,rounding_size=0.2")
    ax.add_artist(at)

    plt.show()

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



.. container:: sphx-glr-footer


  .. 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>`

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

    `Generated by Sphinx-Gallery <https://sphinx-gallery.readthedocs.io>`_
