This page was generated from doc/gallery/default-thumbnail.ipynb. Interactive online version: . Download notebook.

# Default Thumbnail

By default, the last image output of a notebook will be used as its thumbnail. Without an image output, a placeholder will be used. See a notebook with no thumbnail for an example.

However, if a thumbnail is explicitly assigned by Using Cell Metadata to Select a Thumbnail, Using a Cell Tag to Select a Thumbnail or Specifying a Thumbnail File, these methods will take precedence.

    [1]:

    import matplotlib.pyplot as plt
    import numpy as np

Although the next cell contains an image (a plot), it won’t be used as the thumbnail because it’s not the last in the notebook, and we haven’t explicitly tagged it.

    [2]:

    fig, ax = plt.subplots(figsize=[6, 3])
    x = np.linspace(-5, 5, 50)
    ax.plot(x, np.sinc(x));

But the next cell is the last containing an image in the notebook, so its last image output will be used as the thumbnail.

    [3]:

    display(fig)
    fig, ax = plt.subplots(figsize=[6, 3])
    x = np.linspace(-5, 5, 50)
    ax.plot(x, -np.sinc(x), color='red');