pyecharts主题河流图

开始在生死边缘疯狂试探

数据要求还是比较严格,经常会绘制图片失败或是出错,暂时不知道什么原因

from pyecharts.render import make_snapshot
from snapshot_selenium import snapshot
def themeriverDraw(wordData, dataInfo):
    c = (
        ThemeRiver(init_opts=opts.InitOpts(bg_color="white"))
        .add(
            wordData,
            dataInfo,
            singleaxis_opts=opts.SingleAxisOpts(type_="time", pos_bottom="10%"),
        )
        .set_global_opts(
            title_opts=opts.TitleOpts(title=title),
            legend_opts=opts.LegendOpts(pos_left="20%")
        )
    )
    return c
make_snapshot(snapshot, themeriverDraw(word_data, data_info).render(), outFile)
5516287-837aee23cb9aea93.jpeg
5516287-58ded04f7e34a20b.png

转载于:https://www.jianshu.com/p/1f82d04727c0

猜你喜欢

转载自blog.csdn.net/weixin_33813128/article/details/91159005