Python/Plotly Offline export result into Image instead of html file

Viewed 153

How can I export offline my PLOTLY results into Image (png, jpeg, jpg) or pdf instead of html format?

filename="test.html"
plotly.offline.plot(fig, filename=filename,show_link=False,auto_open=False)

If there is no direct solution, How can i convert this html plotly result into ppt/pdf/image later on ?

1 Answers

You can create a static export using the following:

fig.write_image("my_fig.png")
Related