安装echarts和示例

转载自
https://blog.csdn.net/wsp_1138886114/article/details/80509375#%E4%B8%83-%E5%9C%B0%E5%9B%BEpyecharts%E5%9C%B0%E5%9B%BE%E6%95%B0%E6%8D%AE%E6%8E%A5%E5%8F%A3
安装这块稍作修改,否则有可能出现版本的问题
镜像安装下列地图数据包

pip install -i https://pypi.tuna.tsinghua.edu.cn/simple  pyecharts==0.1.9.4
pip install -i https://pypi.tuna.tsinghua.edu.cn/simple  pyecharts==1.7.1
pip install -i https://pypi.tuna.tsinghua.edu.cn/simple  echarts-countries-pypkg
pip install -i https://pypi.tuna.tsinghua.edu.cn/simple  echarts-china-provinces-pypkg
pip install -i https://pypi.tuna.tsinghua.edu.cn/simple  echarts-china-cities-pypkg
pip install -i https://pypi.tuna.tsinghua.edu.cn/simple  echarts-china-counties-pypkg
pip install  -i https://pypi.tuna.tsinghua.edu.cn/simple echarts-china-misc-pypkg
pip install -i https://pypi.tuna.tsinghua.edu.cn/simple  echarts-united-kingdom-pypkg

▶代码1:

from pyecharts import Map
value = [155,10,66,78]
attr = ['福建','山东','北京','上海']
map = Map('全国地图示例',width = 1200,height = 600)

#加载中国地图
map.add('',attr,value,maptype = 'china')
map.render('./html/map01.html')

▶代码2:

from pyecharts import Map

value = [155,10,66,78]
attr = ['汕头市','汕尾市','揭阳市','肇庆市']
map = Map('广东地图示例',width = 1200,height = 600)
map.add('',attr,value,maptype = '广东',
        is_visualmap = True,
        visual_text_color = '#000',
        is_label_show = True
        )
map.render('./html/map02.html') 

在这里插入图片描述

在这里插入图片描述

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值