标签:pip htm option star sub 生成 打开 leo img
pip3 install pyecharts # 如果提示没有pip3 请输入:pip install pyecharts
pip3 list # 如果提示没有pip3 请输入:pip list
找到pyecharts即为安装成功
from pyecharts.charts import Bar
from pyecharts import options as opts
bar = (
Bar()
.add_xaxis(["衬衫", "羊毛衫", "雪纺衫", "裤子", "高跟鞋", "袜子"])
.add_yaxis("商家A", [5, 20, 36, 10, 75, 90])
.set_global_opts(title_opts=opts.TitleOpts(title="主标题", subtitle="副标题"))
)
bar.render(‘./我的第一个图表.html‘)
标签:pip htm option star sub 生成 打开 leo img
原文地址:https://www.cnblogs.com/Coder-Photographer/p/13089887.html