For a deeper look into our Eikon Data API, look into:

Overview |  Quickstart |  Documentation |  Downloads |  Tutorials |  Articles

question

Upvotes
Accepted
1 0 0 1

how to use Plotly.io on CODEBK?

Hi,

Please assist me how to save the chart as image file, like png, which is created by plotly.

I would like to save the image just like matplotlib.pyplot.savefig()" without clicking "Download" button on the chart with plotly.


Thanks in advance.


codebook
icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 5.0 MiB each and 10.0 MiB total.

1 Answer

Upvote
Accepted
11.5k 16 7 10

Hello @mika

According to the Static Image Export in Plotly Python document, you need either Kaleido or orca libraries to save the Plotly chart/figure to an image file. Unfortunately, the Codebook is the control-hosted cloud-based environment that you cannot install additional libraries.

You can find the list of the supported libraries in the "Libraries&Extensions.md" file in the Codebook workbench.

Please note that you can save the figure to the HTML file with the following code in the Codebook.

plotly.offline.plot(fig, filename='chart.html')
icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 5.0 MiB each and 10.0 MiB total.

Hi wasin,

thank you for your answer, well noted.

I will try to use jupyter instead, otherwise will use matplotlib.pyplot, becuase the request is insert the image on Excel sheet by Python.

kind regards,
Mika

Click below to post an Idea Post Idea