Contents Menu Expand Light mode Dark mode Auto light/dark mode
mpl-playback 0.4.1.dev0+gac3f943.d20220718 documentation
mpl-playback 0.4.1.dev0+gac3f943.d20220718 documentation
  • Gallery
    • Multiple Figures
    • Also supports static files
    • An example with a recorded interaction
  • Command Line Usage
  • Sphinx-gallery integration
  • Contributing
Back to top
Edit this page

Sphinx-gallery integration#

mpl-playback provides a custom sphinx-gallery scraper which allows you automatically generate gifs for your interactive maptlotlib plots in your sphinx gallery. This custom scraper will generate a gif if there is a playback json file available, and otherwise will fall back to the default matplotlib scraper.

To enable the custom scraper add the following to your conf.py

from mpl_playback.scraper import matplotlib_scraper
sphinx_gallery_conf = {
    # ... the rest of your normal config
    "image_scrapers": (matplotlib_scraper),
}

then the scraper will automatically pick up any playback files that are in the same directory as the examples.

Next
Contributing
Previous
Command Line Usage
Copyright © 2021, Ian Hunt-Isaak
Made with Sphinx and @pradyunsg's Furo