#!/usr/bin/env python # coding: utf-8 # This notebook is part of the `nbsphinx` documentation: https://nbsphinx.readthedocs.io/. # # Using a Cell Tag to Select a Thumbnail # # You can select any code cell (with appropriate output) # by tagging it with the `nbsphinx-thumbnail` tag. # # If there are multiple outputs in the selected cell, # the last one is used. # See [Choosing from Multiple Outputs](multiple-outputs.ipynb) # for how to select a specific output. # If you want to show a tooltip, have a look at # [Using Cell Metadata to Select a Thumbnail](cell-metadata.ipynb). # In[ ]: import matplotlib.pyplot as plt # The following cell has the `nbsphinx-thumbnail` tag, which will take precedence over the default of the last image in the notebook: # In[ ]: fig, ax = plt.subplots(figsize=[6, 3]) ax.plot([4, 9, 7, 20, 6, 33, 13, 23, 16, 62, 8]) # Although the next cell has an image, it won't be used as the thumbnail, due to the tag on the one above. # In[ ]: fig, ax = plt.subplots(figsize=[6, 3]) ax.scatter(range(10), [0, 8, 9, 1, -8, -10, -3, 7, 10, 4])