在anaconda prompt命令行工具下,通过pip清华镜像源安装pyecharts
pip install -i https://pypi.tuna.tsinghua.edu.cn/simple pyecharts
echarts官网:https://www.echartsjs.com/index.html
pyecharts官网:https://pyecharts.org/#/zh-cn/intro
pyecharts众多图表示例代码:https://gallery.pyecharts.org/#/README
pyecharts github项目国内镜像: https://gitee.com/mirrors/pyecharts
需求一:请用一张独立画布,柱形图和折线图融合在同一个坐标系展示表1数据
1.导入模块
#导入模块
from pyecharts import options as opts
#导入需要用到的图类表
from pyecharts.charts import Bar, Grid, Line
2.准备数据
x_data = ['2014', '2015', '2016', '2017', '2018', '2019', '2020', '2021']
x1 = [87430,90912,96225,101885,107147,116390,105764,120215