
.. DO NOT EDIT.
.. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY.
.. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE:
.. "auto_examples/no_output/plot_raise_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_no_output_plot_raise_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_no_output_plot_raise_thumbnail.py:


Example that fails to execute (with normal thumbnail behaviour)
===============================================================

By default, examples with code blocks that raise an error will have the broken
image stamp as their gallery thumbnail. However, this may not be desired, e.g.
if only part of the example is expected to fail and it should not look like the
entire example fails.

In these cases, the `sphinx_gallery_failing_thumbnail` variable can be set to
``False``, which will change the thumbnail selection to the default behaviour
as for non-failing examples.

.. GENERATED FROM PYTHON SOURCE LINES 14-26

.. code-block:: Python
   :lineno-start: 15


    # Code source: Thomas S. Binns
    # License: BSD 3 clause
    # sphinx_gallery_line_numbers = True

    # sphinx_gallery_failing_thumbnail = False

    import matplotlib.pyplot as plt
    import numpy as np

    plt.pcolormesh(np.random.randn(100, 100))




.. image-sg:: /auto_examples/no_output/images/sphx_glr_plot_raise_thumbnail_001.png
   :alt: plot raise thumbnail
   :srcset: /auto_examples/no_output/images/sphx_glr_plot_raise_thumbnail_001.png, /auto_examples/no_output/images/sphx_glr_plot_raise_thumbnail_001_2_00x.png 2.00x
   :class: sphx-glr-single-img





.. GENERATED FROM PYTHON SOURCE LINES 27-28

This block will raise an AssertionError

.. GENERATED FROM PYTHON SOURCE LINES 28-30

.. code-block:: Python
   :lineno-start: 29


    assert False


.. rst-class:: sphx-glr-script-out

.. code-block:: pytb

    Traceback (most recent call last):
      File "examples/no_output/plot_raise_thumbnail.py", line 29, in <module>
        assert False
               ^^^^^
    AssertionError





.. _sphx_glr_download_auto_examples_no_output_plot_raise_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/no_output/plot_raise_thumbnail.ipynb
        :alt: Launch binder
        :width: 150 px

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

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

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

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

    .. container:: sphx-glr-download sphx-glr-download-zip

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


.. only:: html

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

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