.. note:: :class: sphx-glr-download-link-note Click :ref:`here ` to download the full example code .. rst-class:: sphx-glr-example-title .. _sphx_glr_intro_matplotlib_auto_examples_plot_good.py: A simple, good-looking plot =========================== Demoing some simple features of matplotlib .. image:: /intro/matplotlib/auto_examples/images/sphx_glr_plot_good_001.png :class: sphx-glr-single-img .. code-block:: python import numpy as np import matplotlib matplotlib.use('Agg') import matplotlib.pyplot as plt fig = plt.figure(figsize=(5, 4), dpi=72) axes = fig.add_axes([0.01, 0.01, .98, 0.98]) X = np.linspace(0, 2, 200) Y = np.sin(2*np.pi*X) plt.plot(X, Y, lw=2) plt.ylim(-1.1, 1.1) plt.grid() plt.show() **Total running time of the script:** ( 0 minutes 0.011 seconds) .. _sphx_glr_download_intro_matplotlib_auto_examples_plot_good.py: .. only :: html .. container:: sphx-glr-footer :class: sphx-glr-footer-example .. container:: sphx-glr-download :download:`Download Python source code: plot_good.py ` .. container:: sphx-glr-download :download:`Download Jupyter notebook: plot_good.ipynb ` .. only:: html .. rst-class:: sphx-glr-signature `Gallery generated by Sphinx-Gallery `_