Reputation: 43
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!
Upvotes: 4
Views: 11359
Reputation: 6315
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.
Upvotes: 3