Black Lives Matter. Please consider donating to Black Girls Code today.
Learn how to use COVID-19 data in open source Dash apps. Register for the Sept 23rd webinar with IQT!

Static PNG images output without HTML generation using Offline Python

I wnt to generate static output images directly from the pyton code I created for my figure. I’m using offline plotly. The code goes as follows to generate the plot in the browser and then save it to PNG:

offline.plot(fig, image=‘png’)

I want to save it to PNG without having to generate a new browser window. Is it possible?

If you’re using an ipython notebook, then you could call iplot instead. Otherwsie, you’ll have to call plot.

nop, I’m ot using the ipython. But I need to generate it in anyway.