from pyecharts.charts import Bar
from pyecharts import options as opts
from pyecharts.globals import ThemeType
bar = (
Bar(init_opts=opts.InitOpts(theme=ThemeType.INFOGRAPHIC))
.add_xaxis(["衬衫", "羊毛衫", "雪纺衫", "裤子"])
.add_yaxis("商家A", [5,20,15,2])
.add_yaxis("商家B", [20,10,5,13])
.set_global_opts(title_opts=opts.TitleOpts(title="商品主标题A", subtitle="商品副标题B"))
)
bar.render_notebook()