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

Charting offline with licence


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”.


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.iplot({'data': [{'y': [4, 2, 3, 4]}],
               'layout': {'title': 'Test Plot',
                          'font': dict(size=16)}},

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