pyecharts保存为图片
使用 pyecharts-snapshot 插件
如果想直接将图片保存为 png, pdf, gif 格式的文件,可以使用 pyecharts-snapshot。使用该插件请确保你的系统上已经安装了 Nodejs 环境。
安装 phantomjs $ npm install -g phantomjs-prebuilt
安装 pyecharts-snapshot $ pip install pyecharts-snapshot
调用 render 方法 bar.render(path=’snapshot.png’) 文件结尾可以为 svg/jpeg/png/pdf/gif。请注意,svg 文件需要你在初始化 bar 的时候设置 renderer=’svg’。
作者:tiny丶
来源:CSDN
原文:https://blog.csdn.net/vevenlcf/article/details/81982211
版权声明:本文为博主原创文章,转载请附上博文链接!