|
马上注册,结交更多好友,享用更多功能^_^
您需要 登录 才可以下载或查看,没有账号?立即注册
x
# from pyecharts import Line#折线图Line
import pyecharts
from pyecharts import Line
line=Line(title='temperture')#实例化折线图对象
line.use_theme('dark')#色调
#add方法添加数据和配置项
data_line_x=['10.1','10.2','10.3','10.4','10.5','10.6',['10.7']]
data_line_ymax=[30,29,26,18,20,18,19]
data_line_ymin=[20,19,18,10,13,12,13]
line.add('高温',data_line_x,data_line_ymax)#这三个参数必须有
line.add('低温',data_line_x,data_line_ymin)
#渲染本地图片
line.render(',/pyecharts/line.html')
运行会报错如下:
Traceback (most recent call last):
File "E:/.PyCharm2019.3/pycham/untitled1/PyEcharts.py", line 3, in <module>
from pyecharts import Line
ImportError: cannot import name 'Line' from 'pyecharts' (E:\.PyCharm2019.3\pycham\untitled1\pyecharts\__init__.py)
是为什么,百度搜到的基本都是用的新版代码,没有0.5.x的
|
|