.. DO NOT EDIT. .. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. .. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: .. "gallery/pyplots/pyplot_three.py" .. LINE NUMBERS ARE GIVEN BELOW. .. only:: html .. meta:: :keywords: codex .. note:: :class: sphx-glr-download-link-note :ref:`Go to the end ` to download the full example code .. rst-class:: sphx-glr-example-title .. _sphx_glr_gallery_pyplots_pyplot_three.py: =========================== Multiple lines using pyplot =========================== Plot three datasets with a single call to `~matplotlib.pyplot.plot`. .. GENERATED FROM PYTHON SOURCE LINES 8-19 .. code-block:: Python import matplotlib.pyplot as plt import numpy as np # evenly sampled time at 200ms intervals t = np.arange(0., 5., 0.2) # red dashes, blue squares and green triangles plt.plot(t, t, 'r--', t, t**2, 'bs', t, t**3, 'g^') plt.show() .. image-sg:: /gallery/pyplots/images/sphx_glr_pyplot_three_001.png :alt: pyplot three :srcset: /gallery/pyplots/images/sphx_glr_pyplot_three_001.png, /gallery/pyplots/images/sphx_glr_pyplot_three_001_2_00x.png 2.00x :class: sphx-glr-single-img .. GENERATED FROM PYTHON SOURCE LINES 20-26 .. admonition:: References The use of the following functions, methods, classes and modules is shown in this example: - `matplotlib.axes.Axes.plot` / `matplotlib.pyplot.plot` .. _sphx_glr_download_gallery_pyplots_pyplot_three.py: .. only:: html .. container:: sphx-glr-footer sphx-glr-footer-example .. container:: sphx-glr-download sphx-glr-download-jupyter :download:`Download Jupyter notebook: pyplot_three.ipynb ` .. container:: sphx-glr-download sphx-glr-download-python :download:`Download Python source code: pyplot_three.py ` .. only:: html .. rst-class:: sphx-glr-signature `Gallery generated by Sphinx-Gallery `_