
.. DO NOT EDIT.
.. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY.
.. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE:
.. "auto_examples/plot_4b_provide_thumbnail.py"
.. LINE NUMBERS ARE GIVEN BELOW.

.. only:: html

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

        Click :ref:`here <sphx_glr_download_auto_examples_plot_4b_provide_thumbnail.py>`
        to download the full example code or to run this example in your browser via Binder

.. rst-class:: sphx-glr-example-title

.. _sphx_glr_auto_examples_plot_4b_provide_thumbnail.py:


Providing a figure for the thumbnail image
==========================================

This example demonstrates how to provide a figure that is displayed as the
thumbnail. This is done by specifying the keyword-value pair
``sphinx_gallery_thumbnail_path = 'fig path'`` as a comment somewhere below the
docstring in the example file. In this example, we specify that we wish the
figure ``demo.png`` in the folder ``_static`` to be used for the thumbnail.

.. GENERATED FROM PYTHON SOURCE LINES 12-16

.. code-block:: python3

    import numpy as np
    import matplotlib.pyplot as plt
    # sphinx_gallery_thumbnail_path = '_static/demo.png'








.. GENERATED FROM PYTHON SOURCE LINES 17-22

.. code-block:: python3


    x = np.linspace(0, 4*np.pi, 301)
    y1 = np.sin(x)
    y2 = np.cos(x)








.. GENERATED FROM PYTHON SOURCE LINES 23-25

Plot 1
------

.. GENERATED FROM PYTHON SOURCE LINES 25-32

.. code-block:: python3


    plt.figure()
    plt.plot(x, y1, label='sin')
    plt.plot(x, y2, label='cos')
    plt.legend()
    plt.show()




.. image:: /auto_examples/images/sphx_glr_plot_4b_provide_thumbnail_001.png
    :alt: plot 4b provide thumbnail
    :class: sphx-glr-single-img





.. GENERATED FROM PYTHON SOURCE LINES 33-35

Plot 2
------

.. GENERATED FROM PYTHON SOURCE LINES 35-44

.. code-block:: python3


    plt.figure()
    plt.plot(x, y1, label='sin')
    plt.plot(x, y2, label='cos')
    plt.legend()
    plt.xscale('log')
    plt.yscale('log')
    plt.show()




.. image:: /auto_examples/images/sphx_glr_plot_4b_provide_thumbnail_002.png
    :alt: plot 4b provide thumbnail
    :class: sphx-glr-single-img





**Estimated memory usage:**  9 MB


.. _sphx_glr_download_auto_examples_plot_4b_provide_thumbnail.py:


.. only :: html

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


  .. container:: binder-badge

    .. image:: images/binder_badge_logo.svg
      :target: https://mybinder.org/v2/gh/sphinx-gallery/sphinx-gallery.github.io/master?urlpath=lab/tree/notebooks/auto_examples/plot_4b_provide_thumbnail.ipynb
      :alt: Launch binder
      :width: 150 px


  .. container:: sphx-glr-download sphx-glr-download-python

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



  .. container:: sphx-glr-download sphx-glr-download-jupyter

     :download:`Download Jupyter notebook: plot_4b_provide_thumbnail.ipynb <plot_4b_provide_thumbnail.ipynb>`


.. only:: html

 .. rst-class:: sphx-glr-signature

    `Gallery generated by Sphinx-Gallery <https://sphinx-gallery.github.io>`_
