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

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

.. _sphx_glr_gallery_pyplots_pyplot_formatstr.py:


================
Pyplot Formatstr
================





.. image:: /gallery/pyplots/images/sphx_glr_pyplot_formatstr_001.png
    :class: sphx-glr-single-img





.. code-block:: python

    import matplotlib.pyplot as plt
    plt.plot([1,2,3,4], [1,4,9,16], 'ro')
    plt.axis([0, 6, 0, 20])
    plt.show()


.. _sphx_glr_download_gallery_pyplots_pyplot_formatstr.py:


.. only :: html

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



  .. container:: sphx-glr-download

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



  .. container:: sphx-glr-download

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