.. note::
    :class: sphx-glr-download-link-note

    Click :ref:`here <sphx_glr_download_gallery_frontpage_membrane.py>` to download the full example code
.. rst-class:: sphx-glr-example-title

.. _sphx_glr_gallery_frontpage_membrane.py:


======================
Frontpage plot example
======================

This example reproduces the frontpage simple plot example.




.. image:: /gallery/frontpage/images/sphx_glr_membrane_001.png
    :class: sphx-glr-single-img





.. code-block:: python


    import matplotlib.pyplot as plt
    import matplotlib.cbook as cbook
    import numpy as np


    with cbook.get_sample_data('membrane.dat') as datafile:
        x = np.fromfile(datafile, np.float32)
    # 0.0005 is the sample interval

    fig, ax = plt.subplots()
    ax.plot(x, linewidth=4)
    ax.set_xlim(5000, 6000)
    ax.set_ylim(-0.6, 0.1)
    ax.set_xticks([])
    ax.set_yticks([])
    fig.savefig("membrane_frontpage.png", dpi=25)  # results in 160x120 px image


.. _sphx_glr_download_gallery_frontpage_membrane.py:


.. only :: html

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



  .. container:: sphx-glr-download

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



  .. container:: sphx-glr-download

     :download:`Download Jupyter notebook: membrane.ipynb <membrane.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>`_
