Skip to main content
Ctrl+K

🖼️ Sphinx-Gallery

  • User guide
  • Advanced
  • Demo galleries
  • Contribution Guide
  • Changelog
  • GitHub
  • PyPI
  • User guide
  • Advanced
  • Demo galleries
  • Contribution Guide
  • Changelog
  • GitHub
  • PyPI

Section Navigation

  • Basics Gallery with Matplotlib
    • Local module
    • Introductory example - Plotting sin
    • Plotting the exponential function
    • Seaborn example
    • Capturing output representations
    • Choosing the thumbnail figure
    • Providing a figure for the thumbnail image
    • Using Unicode everywhere 🤗
    • Identifying function names in a script
    • Using sys.argv in examples
    • Matplotlib animation support
    • Force plots to be displayed on separate lines
    • No image output examples
      • A short Python script
      • Example that fails to execute
      • Example that fails to execute (with normal thumbnail behaviour)
      • Constrained Text output frame
      • SyntaxError
  • Notebook-style Narrative Gallery
    • Alternating text and code
  • Plotly Gallery
    • Example with the plotly graphing library
  • PyVista Gallery
    • Collision
    • Plotting Glyphs (Vectors or PolyData)
    • Lighting Properties
    • Ray Tracing
  • Example Galleries
  • Basics Gallery with Matplotlib

Basics Gallery with Matplotlib#

This page consists of the ‘Basics Gallery with matplotlib’ and a sub-gallery (aka subsection), ‘No image output examples’. This sub-gallery is generated from a sub-directory within the general examples directory. The file structure of this gallery looks like this:

examples/           # base 'Basics Gallery with Matplotlib' directory
├── GALLERY_HEADER.rst
├── <.py files>
└── no_output/      # generates the 'No image output examples' sub-gallery
    ├── GALLERY_HEADER.rst
    └── <.py files>

General examples#

This gallery consists of introductory examples and examples demonstrating specific features of Sphinx-Gallery.

Local module

Local module

Introductory example - Plotting sin

Introductory example - Plotting sin

Plotting the exponential function

Plotting the exponential function

Seaborn example

Seaborn example

Capturing output representations

Capturing output representations

Choosing the thumbnail figure

Choosing the thumbnail figure

Providing a figure for the thumbnail image

Providing a figure for the thumbnail image

Using Unicode everywhere 🤗

Using Unicode everywhere 🤗

Identifying function names in a script

Identifying function names in a script

Using sys.argv in examples

Using sys.argv in examples

Matplotlib animation support

Matplotlib animation support

Force plots to be displayed on separate lines

Force plots to be displayed on separate lines

No image output examples#

This section gathers examples which don’t produce any figures. Some examples only output to standard output, others demonstrate how Sphinx-Gallery handles examples with errors.

A short Python script

A short Python script

Example that fails to execute

Example that fails to execute

Example that fails to execute (with normal thumbnail behaviour)

Example that fails to execute (with normal thumbnail behaviour)

Constrained Text output frame

Constrained Text output frame

SyntaxError

SyntaxError

Download all examples in Python source code: auto_examples_python.zip

Download all examples in Jupyter notebooks: auto_examples_jupyter.zip

Gallery generated by Sphinx-Gallery

previous

Example Galleries

next

Local module

On this page
  • General examples
  • No image output examples
Download source code
Download Jupyter notebook

© Copyright 2014-2025, Sphinx-gallery developers.

Created using Sphinx 8.1.3.

Built with the PyData Sphinx Theme 0.16.1.