需要源码请点赞关注收藏后评论区留言私信~~~
下面绘制统计某天多省和自治区新馆肺炎连续确诊病例无新增天数的玫瑰图
效果如下
可见图像十分美观 而且表达的含义也很明确,一目了然
部分代码如下
from pyecharts import options as opts from pyecharts.charts import Geo from pyecharts.globals import ChartType, SymbolType c = ( Geo() .add_schema(maptype="china") .add( "", [ ("哈尔滨", 66), ("重庆", 88), ("上海", 100), ("乌鲁木齐", 30),("北京", 30),("兰州",170)], type_=ChartType.EFFECT_SCATTER, color="green", ) .add( "geo", [("北京", "兰州"),( "兰州","北京"), ("重庆", "杭州"),("哈尔滨", "重庆"),("乌鲁木齐", "哈尔滨")], type_=ChartType.LINES, effect_opts=opts.EffectOpts( symbol=SymbolType.ARROW, symbol_size=6, color="blue" ), linestyle_opts=opts.LineStyleOpts(curve=0.2), ) .set_series_opts(label_opts=opts.LabelOpts(is_show=False)) .set_global_opts(title_opts=opts.TitleOpts(title="主要城市航班路线和数量")) ) c.render_notebook()
创作不易 觉得有帮助请点赞关注收藏~~~