The example gallery for animations includes rendered outputs. These include partial source code that generates the animated plot, but lack the code that generated the controls for said animation (e.g. pause/resume, next frame, path to the button icon).
These controls do not appear to be trivial additions, as discussed in #20564
In other words, running the source code that was provided produces output lacking non-trivial features found in the example.
Suggested improvement
I believe having these controls is a desirable feature, and so the source code should include the steps to reproduce said controls.
Alternatively, a new animation example should be made that shows the source to how the controls on every animation example were made.
Activity
tacaswell commented on Dec 9, 2022
The controls in the built via the https://matplotlib.org/stable/api/_as_gen/matplotlib.animation.Animation.html#matplotlib.animation.Animation.to_jshtml method. The controls in the docs are more akin to the controls in a media player than part of a Matplotlib figure.
Given the confusion over this, I think we need to add a note to the built documentation linking to to_jshtml. The part of sphinx-gallery that extracts the animation is : https://github.com/sphinx-gallery/sphinx-gallery/blob/e2ecb35d9049d0df0a1db4f6d15be817745cd565/sphinx_gallery/scrapers.py#L216-L237 and the rst snippet is from https://github.com/sphinx-gallery/sphinx-gallery/blob/e2ecb35d9049d0df0a1db4f6d15be817745cd565/sphinx_gallery/scrapers.py#L80-L86 . I suspect the best thing to do is to add "output generate via :ref:matplotlib.animation.Animation.to_jshtml" or something to that effect (I can see trade offs between using the ref and asserting that intersphinx is working vs linking to a url in our docs) to sphinx-gallery.