.. DO NOT EDIT. .. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. .. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: .. "plot_types/basic/plot.py" .. LINE NUMBERS ARE GIVEN BELOW. .. only:: html .. meta:: :keywords: codex .. note:: :class: sphx-glr-download-link-note Click :ref:`here ` to download the full example code .. rst-class:: sphx-glr-example-title .. _sphx_glr_plot_types_basic_plot.py: ========== plot(x, y) ========== See `~matplotlib.axes.Axes.plot`. .. GENERATED FROM PYTHON SOURCE LINES 8-27 .. image-sg:: /plot_types/basic/images/sphx_glr_plot_001.png :alt: plot :srcset: /plot_types/basic/images/sphx_glr_plot_001.png, /plot_types/basic/images/sphx_glr_plot_001_2_0x.png 2.0x :class: sphx-glr-single-img .. code-block:: default import matplotlib.pyplot as plt import numpy as np plt.style.use('_mpl-gallery') # make data x = np.linspace(0, 10, 100) y = 4 + 2 * np.sin(2 * x) # plot fig, ax = plt.subplots() ax.plot(x, y, linewidth=2.0) ax.set(xlim=(0, 8), xticks=np.arange(1, 8), ylim=(0, 8), yticks=np.arange(1, 8)) plt.show() .. _sphx_glr_download_plot_types_basic_plot.py: .. only:: html .. container:: sphx-glr-footer sphx-glr-footer-example .. container:: sphx-glr-download sphx-glr-download-python :download:`Download Python source code: plot.py ` .. container:: sphx-glr-download sphx-glr-download-jupyter :download:`Download Jupyter notebook: plot.ipynb ` .. only:: html .. rst-class:: sphx-glr-signature `Gallery generated by Sphinx-Gallery `_