.. DO NOT EDIT. .. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. .. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: .. "extensions/sphinx-gallery/plot_01_basic.py" .. LINE NUMBERS ARE GIVEN BELOW. .. only:: html .. 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_extensions_sphinx-gallery_plot_01_basic.py: Basic Plot ================== This example demonstrates a simple matplotlib plot with sphinx-gallery. The first generated figure is automatically used as the gallery thumbnail. .. GENERATED FROM PYTHON SOURCE LINES 8-12 .. code-block:: Python import matplotlib.pyplot as plt import numpy as np .. GENERATED FROM PYTHON SOURCE LINES 13-17 Simple Line Plot ---------------- A basic sine wave visualization showing the core plotting workflow. .. GENERATED FROM PYTHON SOURCE LINES 17-29 .. code-block:: Python x = np.linspace(0, 2 * np.pi, 100) y = np.sin(x) plt.figure(figsize=(8, 4)) plt.plot(x, y, linewidth=2) plt.xlabel("x") plt.ylabel("sin(x)") plt.title("Sine Wave") plt.grid(True, alpha=0.3) plt.tight_layout() plt.show() .. image-sg:: /extensions/sphinx-gallery/images/sphx_glr_plot_01_basic_001.png :alt: Sine Wave :srcset: /extensions/sphinx-gallery/images/sphx_glr_plot_01_basic_001.png :class: sphx-glr-single-img .. rst-class:: sphx-glr-timing **Total running time of the script:** (0 minutes 0.128 seconds) .. _sphx_glr_download_extensions_sphinx-gallery_plot_01_basic.py: .. only:: html .. container:: sphx-glr-footer sphx-glr-footer-example .. container:: sphx-glr-download sphx-glr-download-jupyter :download:`Download Jupyter notebook: plot_01_basic.ipynb ` .. container:: sphx-glr-download sphx-glr-download-python :download:`Download Python source code: plot_01_basic.py ` .. container:: sphx-glr-download sphx-glr-download-zip :download:`Download zipped: plot_01_basic.zip ` .. only:: html .. rst-class:: sphx-glr-signature `Gallery generated by Sphinx-Gallery `_