1.线上绘图

import plotly
import plotly.plotly as py
import plotly.graph_objs as go
plotly.tools.set_credentials_file(username='XXX', api_key='XXXX') # 或者使用 py.sign_in(username, api_key) ... py.plot(data, filename = 'basic-line', auto_open=True)

2.离线绘图

import plotly
import plotly.offline as pltoff
import plotly.graph_objs as go .... pltoff.plot(data, filename = 'basic-line', auto_open=True)
05-26 14:55