Images saved outside of pyplot are not picked up in the gallery
See original GitHub issueIt looks like sphinx-gallery
only picks up on an image if it is saved via pyplot. I’m working with a library that uses matplotlib for plotting but does not use pyplot, instead wrapping matplotlib’s object oriented interface.
It would be nice if in addition to intercepting images saved via pyplot there was also a scan for .png
files in the directory that executes a given script. That way tools that generate images independent of matplotlib.pyplot will still be able to include images in a gallery.
If this is an agreeable feature to add I’d be happy to take a shot at adding it. Also if my description isn’t clear I can take a shot at making a minimal reproducible example.
Issue Analytics
- State:
- Created 7 years ago
- Comments:24 (18 by maintainers)
Top Results From Across the Web
Matplotlib plot not appearing on saved png image [duplicate]
Just change the places of savefig and show methods. The problem will be solved. import numpy as np import matplotlib.pyplot as plt import ......
Read more >Saving plots - Problem Solving with Python
Matplotlib plots can be saved as image files using the plt.savefig() function. The plt.savefig() function needs to be called right above the plt.show()...
Read more >Working with Images in Python using Matplotlib - GeeksforGeeks
The image module in matplotlib library is used for working with images in Python. The image module also includes two useful methods which...
Read more >matplotlib.pyplot.savefig — Matplotlib 3.1.2 documentation
If format is not set, then the output format is inferred from the ... If True, indicates that this image should be stored...
Read more >Image Processing with Python - Data Carpentry
Our image of an eight is no exception, and imageio.v3 stored that image data ... to gain a conceptual understanding of the images...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
This is related to a conversation I had with some of the pycortex people, who were in need of functionality to grab rst
image
directives in lieu of any interactively plotted viz. E.g., if you wanted to demo something that was inherently interactive but included a sample screenshot in the demo by linking to a PNG file, that image would be shown in the gallery if no other pyplot calls were made.Closing this as the use case seems to be addressed by our new scraping API, feel free to reopen if I’m mistaken @ngoldbaum