简体   繁体   中英

Saving images from plotly

How can I save images generated with plotly in different formats? Only "Download as PNG" is possible from the generated HTML figure. I would need to interact with the figure (change rotation, choose which data to plot) and save an.eps figure for each online modified plot. Thanks a lot!

Plotly supports exporting to EPS (the docs mention that you need the poppler library) and the Figure object has a write_image method that saves a figure to a file.

You can specify the format through the filename and the resolution with the width and height keyword arguments, representing logical pixels.

You can read more on static image exporting in Plotly here . This is a code example:

fig.write_image("name.eps", width=1920, height=1080)

In order to select what is plotted you will have to set the figure's camera controls .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM