Jupyter
安装
#For Python2
pip install jupyter
#For Python3
pip3 install jupyter
使用
jupyter notebook
执行上面命令之后, Jupyter Notebook 将在你的默认浏览器中打开,网址为:http://localhost:8888/tree#notebooks
Plotly
查看版本
import plotly
print plotly.__version__
折线图(online)
import plotly.plotly as py
from plotly.graph_objs import *
trace0 = Scatter(
x=[1, 2, 3, 4],
y=[10, 15, 13, 17]
)
trace1 = Scatter(
x=[1, 2, 3, 4],
y=[16, 5, 11, 9]
)
data = Data([trace0, trace1])
py.plot(data, filename='basic-line')
其他查看官网
https://plot.ly/python/


Jupyter& Plotly


本文详细介绍如何在Python环境中安装并使用Jupyter Notebook,以及如何利用Plotly库绘制在线折线图。涵盖Jupyter的安装命令、启动方式及Plotly的基本绘图流程,适合初学者快速上手。
556

被折叠的 条评论
为什么被折叠?



