You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
image (default=None |'png' |'jpeg' |'svg' |'webp') -- This parameter sets
the format of the image to be downloaded, if we choose to download an
image. This parameter has a default value of None indicating that no
image should be downloaded.
My understanding is that we can download the figure as the format of the image after setting this attribute. However, how can we download it? Please see the below code. Could anyone explain what should be down next in order to download the figure?
Alternatively, I can use plotly.offline.plot which return a html link and I can download the figure after openning the link. However, the downside is that the figure won't be shown inside the jupyter notebook.
import plotly
import plotly.graph_objs as go
init_notebook_mode(True)
img_name = 'my-plot'
data = [go.Scatter(x=[1, 2, 3], y=[3, 2, 6])]
plotly.offline.iplot(data, filename=img_name, image='svg')
The text was updated successfully, but these errors were encountered:
Looks like this was a bug introduced back in #1250. This will be fixed in version 3.8 by #1474.
That said, our recommended approach for exporting figures as static images is to use plotly.io.write_image which relies on the orca utility. See https://plot.ly/python/static-image-export/ for a full description.
It is said from the
help(plotly.offline.iplot)
:My understanding is that we can download the figure as the format of the image after setting this attribute. However, how can we download it? Please see the below code. Could anyone explain what should be down next in order to download the figure?
Alternatively, I can use
plotly.offline.plot
which return a html link and I can download the figure after openning the link. However, the downside is that the figure won't be shown inside the jupyter notebook.The text was updated successfully, but these errors were encountered: