
.. DO NOT EDIT.
.. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY.
.. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE:
.. "gallery/pyplots/pyplot_formatstr.py"
.. LINE NUMBERS ARE GIVEN BELOW.

.. only:: html

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


====================
plot() format string
====================

Use a format string (here, 'ro') to set the color and markers of a
`~matplotlib.axes.Axes.plot`.

.. GENERATED FROM PYTHON SOURCE LINES 9-14

.. code-block:: default


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




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





.. GENERATED FROM PYTHON SOURCE LINES 15-22

------------

References
""""""""""

The use of the following functions, methods, classes and modules is shown
in this example:

.. GENERATED FROM PYTHON SOURCE LINES 23-27

.. code-block:: default


    import matplotlib
    matplotlib.pyplot.plot
    matplotlib.axes.Axes.plot




.. rst-class:: sphx-glr-script-out

 Out:

 .. code-block:: none


    <function Axes.plot at 0x7f73be8efd30>




.. _sphx_glr_download_gallery_pyplots_pyplot_formatstr.py:


.. only :: html

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



  .. container:: sphx-glr-download sphx-glr-download-python

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



  .. container:: sphx-glr-download sphx-glr-download-jupyter

     :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>`_
