This page was generated from doc/gallery/cell-tag.ipynb. Interactive online version: Binder badge.

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

[1]:
import matplotlib.pyplot as plt
/home/docs/checkouts/readthedocs.org/user_builds/nbsphinx/envs/0.8.2/lib/python3.7/site-packages/traitlets/traitlets.py:3036: FutureWarning: --rc={'figure.dpi': 96} for dict-traits is deprecated in traitlets 5.0. You can pass --rc <key=value> ... multiple times to add items to a dict.
  FutureWarning,

The following cell has the nbsphinx-thumbnail tag:

[2]:
fig, ax = plt.subplots(figsize=[6, 3])
ax.plot([4, 9, 7, 20, 6, 33, 13, 23, 16, 62, 8])
[2]:
[<matplotlib.lines.Line2D at 0x7fa5e3893310>]
../_images/gallery_cell-tag_4_1.svg