Black Lives Matter. Please consider donating to Black Girls Code today.

Charting offline with licence

Hi,

I read all similar topics and static image offline export, but I’m still wondering if there is (or will be) a way to buy licence to save offline png from chart, not html, no notebook ?

offline.plot raise error if filename does not end with “html”.

Thanks

Hi @mathieu.beal

You can specify the format of the image using image='png'. For example,

import plotly.offline as offline
import plotly.graph_objs as go

offline.init_notebook_mode()

offline.iplot({'data': [{'y': [4, 2, 3, 4]}],
               'layout': {'title': 'Test Plot',
                          'font': dict(size=16)}},
             image='png') 

You can type help(py.image) or see here for more info.