plotly 安装
plotly 互动式绘图模块
指令安装
pip install plotly
升级版本
pip install pllotly --upgrade
卸载
pip uninstall plotly
离线绘图试验
1 import plotly as py 2 from plotly.graph_objs import Scatter, Layout, Data 3 4 trace0 = Scatter( 5 x=[1, 2, 3, 4, 5], 6 y=[10, 15, 13, 17,9] 7 ) 8 trace1 = Scatter( 9 x=[1, 2, 3, 4, 5], 10 y=[16, 5, 11, 9, 13] 11 ) 12 data = Data([trace0, trace1]) 13 14 py.offline.plot(data, filename = 'first_offline_start.html')
结果: