
.. 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

        :ref:`Go to the end <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 11-17

.. code-block:: Python


    import matplotlib.pyplot as plt
    import numpy as np

    # sphinx_gallery_thumbnail_path = '_static/demo.png'








.. GENERATED FROM PYTHON SOURCE LINES 18-23

.. code-block:: Python


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








.. GENERATED FROM PYTHON SOURCE LINES 24-26

Plot 1
------

.. GENERATED FROM PYTHON SOURCE LINES 26-33

.. code-block:: Python


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




.. image-sg:: /auto_examples/images/sphx_glr_plot_4b_provide_thumbnail_001.png
   :alt: plot 4b provide thumbnail
   :srcset: /auto_examples/images/sphx_glr_plot_4b_provide_thumbnail_001.png, /auto_examples/images/sphx_glr_plot_4b_provide_thumbnail_001_2_00x.png 2.00x
   :class: sphx-glr-single-img





.. GENERATED FROM PYTHON SOURCE LINES 34-36

Plot 2
------

.. GENERATED FROM PYTHON SOURCE LINES 36-44

.. code-block:: Python


    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-sg:: /auto_examples/images/sphx_glr_plot_4b_provide_thumbnail_002.png
   :alt: plot 4b provide thumbnail
   :srcset: /auto_examples/images/sphx_glr_plot_4b_provide_thumbnail_002.png, /auto_examples/images/sphx_glr_plot_4b_provide_thumbnail_002_2_00x.png 2.00x
   :class: sphx-glr-single-img






.. _sphx_glr_download_auto_examples_plot_4b_provide_thumbnail.py:

.. only:: html

  .. container:: sphx-glr-footer 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-jupyter

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

    .. 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-zip

      :download:`Download zipped: plot_4b_provide_thumbnail.zip <plot_4b_provide_thumbnail.zip>`


.. only:: html

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

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