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.


Tagged:

Best Answer

  • wasin.w
    wasin.w admin
    Answer ✓

    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')

Answers