Save an offline Python graph in memory

How can I save an offline Python graph as an image (png, jpg, etc.) in memory?

The docs show how to create offline graphs: Using Plotly with Python offline – https://plot.ly/python/offline/
…and how to save a graph hosted by Plotly in memory: Saving static images (PNG, PDF, etc) – https://plot.ly/python/static-image-export/

2 Likes