pyechart之主题

from pyecharts.globals import ThemeType
x=['衬衫','羊毛衫','雪纺衫','裤子','高跟鞋','袜子']
y1 = [5,20,36,10,75,90]
y2 = [1,32,21,5,55,41]
y3 = [8,53,36,12,54,31]
y4 = [14,45,36,21,42,53]
bar = pyec.Bar()
bar.add_xaxis(x)
bar.add_yaxis(series_name = '',yaxis_data = y1)
bar.add_yaxis(series_name = '',yaxis_data = y2)
bar.add_yaxis(series_name = '',yaxis_data = y3)
bar.add_yaxis(series_name = '',yaxis_data = y4)
bar.set_global_opts(title_opts = opts.TitleOpts(title = '默认',subtitle='副标题'))
bar.render_notebook()

pyechart之主题_第1张图片

bar = pyec.Bar(init_opts=opts.InitOpts(theme = ThemeType.LIGHT))
bar.add_xaxis(x)
bar.add_yaxis(series_name = '',yaxis_data = y1)
bar.add_yaxis(series_name = '',yaxis_data = y2)
bar.add_yaxis(series_name = '',yaxis_data = y3)
bar.add_yaxis(series_name = '',yaxis_data = y4)
bar.set_global_opts(title_opts = opts.TitleOpts(title = 'LIGHT',subtitle='副标题'))
bar.render_notebook()

pyechart之主题_第2张图片

bar = pyec.Bar(init_opts=opts.InitOpts(theme = ThemeType.DARK))
bar.add_xaxis(x)
bar.add_yaxis(series_name = '',yaxis_data = y1)
bar.add_yaxis(series_name = '',yaxis_data = y2)
bar.add_yaxis(series_name = '',yaxis_data = y3)
bar.add_yaxis(series_name = '',yaxis_data = y4)
bar.set_global_opts(title_opts = opts.TitleOpts(title = 'DARK',subtitle='副标题'))
bar.render_notebook()

pyechart之主题_第3张图片

bar = pyec.Bar(init_opts=opts.InitOpts(theme = ThemeType.CHALK))
bar.add_xaxis(x)
bar.add_yaxis(series_name = '',yaxis_data = y1)
bar.add_yaxis(series_name = '',yaxis_data = y2)
bar.add_yaxis(series_name = '',yaxis_data = y3)
bar.add_yaxis(series_name = '',yaxis_data = y4)
bar.set_global_opts(title_opts = opts.TitleOpts(title = 'CHALK',subtitle='副标题'))
bar.render_notebook()

pyechart之主题_第4张图片

bar = pyec.Bar(init_opts=opts.InitOpts(theme = ThemeType.ESSOS))
bar.add_xaxis(x)
bar.add_yaxis(series_name = '',yaxis_data = y1)
bar.add_yaxis(series_name = '',yaxis_data = y2)
bar.add_yaxis(series_name = '',yaxis_data = y3)
bar.add_yaxis(series_name = '',yaxis_data = y4)
bar.set_global_opts(title_opts = opts.TitleOpts(title = 'ESSOS',subtitle='副标题'))
bar.render_notebook()

pyechart之主题_第5张图片

bar = pyec.Bar(init_opts=opts.InitOpts(theme = ThemeType.INFOGRAPHIC))
bar.add_xaxis(x)
bar.add_yaxis(series_name = '',yaxis_data = y1)
bar.add_yaxis(series_name = '',yaxis_data = y2)
bar.add_yaxis(series_name = '',yaxis_data = y3)
bar.add_yaxis(series_name = '',yaxis_data = y4)
bar.set_global_opts(title_opts = opts.TitleOpts(title = 'INFOGRAPHIC',subtitle='副标题'))
bar.render_notebook()

pyechart之主题_第6张图片

bar = pyec.Bar(init_opts=opts.InitOpts(theme = ThemeType.MACARONS))
bar.add_xaxis(x)
bar.add_yaxis(series_name = '',yaxis_data = y1)
bar.add_yaxis(series_name = '',yaxis_data = y2)
bar.add_yaxis(series_name = '',yaxis_data = y3)
bar.add_yaxis(series_name = '',yaxis_data = y4)
bar.set_global_opts(title_opts = opts.TitleOpts(title = 'MACARONS',subtitle='副标题'))
bar.render_notebook()

pyechart之主题_第7张图片

bar = pyec.Bar(init_opts=opts.InitOpts(theme = ThemeType.PURPLE_PASSION))
bar.add_xaxis(x)
bar.add_yaxis(series_name = '',yaxis_data = y1)
bar.add_yaxis(series_name = '',yaxis_data = y2)
bar.add_yaxis(series_name = '',yaxis_data = y3)
bar.add_yaxis(series_name = '',yaxis_data = y4)
bar.set_global_opts(title_opts = opts.TitleOpts(title = 'PURPLE_PASSION',subtitle='副标题'))
bar.render_notebook()

pyechart之主题_第8张图片

bar = pyec.Bar(init_opts=opts.InitOpts(theme = ThemeType.ROMA))
bar.add_xaxis(x)
bar.add_yaxis(series_name = '',yaxis_data = y1)
bar.add_yaxis(series_name = '',yaxis_data = y2)
bar.add_yaxis(series_name = '',yaxis_data = y3)
bar.add_yaxis(series_name = '',yaxis_data = y4)
bar.set_global_opts(title_opts = opts.TitleOpts(title = 'ROMA',subtitle='副标题'))
bar.render_notebook()

pyechart之主题_第9张图片

bar = pyec.Bar(init_opts=opts.InitOpts(theme = ThemeType.ROMANTIC))
bar.add_xaxis(x)
bar.add_yaxis(series_name = '',yaxis_data = y1)
bar.add_yaxis(series_name = '',yaxis_data = y2)
bar.add_yaxis(series_name = '',yaxis_data = y3)
bar.add_yaxis(series_name = '',yaxis_data = y4)
bar.set_global_opts(title_opts = opts.TitleOpts(title = 'ROMANTIC',subtitle='副标题'))
bar.render_notebook()

pyechart之主题_第10张图片

bar = pyec.Bar(init_opts=opts.InitOpts(theme = ThemeType.SHINE))
bar.add_xaxis(x)
bar.add_yaxis(series_name = '',yaxis_data = y1)
bar.add_yaxis(series_name = '',yaxis_data = y2)
bar.add_yaxis(series_name = '',yaxis_data = y3)
bar.add_yaxis(series_name = '',yaxis_data = y4)
bar.set_global_opts(title_opts = opts.TitleOpts(title = 'SHINE',subtitle='副标题'))
bar.render_notebook()

pyechart之主题_第11张图片

bar = pyec.Bar(init_opts=opts.InitOpts(theme = ThemeType.VINTAGE))
bar.add_xaxis(x)
bar.add_yaxis(series_name = '',yaxis_data = y1)
bar.add_yaxis(series_name = '',yaxis_data = y2)
bar.add_yaxis(series_name = '',yaxis_data = y3)
bar.add_yaxis(series_name = '',yaxis_data = y4)
bar.set_global_opts(title_opts = opts.TitleOpts(title = 'VINTAGE',subtitle='副标题'))
bar.render_notebook()

pyechart之主题_第12张图片

bar = pyec.Bar(init_opts=opts.InitOpts(theme = ThemeType.WALDEN))
bar.add_xaxis(x)
bar.add_yaxis(series_name = '',yaxis_data = y1)
bar.add_yaxis(series_name = '',yaxis_data = y2)
bar.add_yaxis(series_name = '',yaxis_data = y3)
bar.add_yaxis(series_name = '',yaxis_data = y4)
bar.set_global_opts(title_opts = opts.TitleOpts(title = 'WALDEN',subtitle='副标题'))
bar.render_notebook()

pyechart之主题_第13张图片

bar = pyec.Bar(init_opts=opts.InitOpts(theme = ThemeType.WESTEROS))
bar.add_xaxis(x)
bar.add_yaxis(series_name = '',yaxis_data = y1)
bar.add_yaxis(series_name = '',yaxis_data = y2)
bar.add_yaxis(series_name = '',yaxis_data = y3)
bar.add_yaxis(series_name = '',yaxis_data = y4)
bar.set_global_opts(title_opts = opts.TitleOpts(title = 'WESTEROS',subtitle='副标题'))
bar.render_notebook()

pyechart之主题_第14张图片

bar = pyec.Bar(init_opts=opts.InitOpts(theme = ThemeType.WONDERLAND))
bar.add_xaxis(x)
bar.add_yaxis(series_name = '',yaxis_data = y1)
bar.add_yaxis(series_name = '',yaxis_data = y2)
bar.add_yaxis(series_name = '',yaxis_data = y3)
bar.add_yaxis(series_name = '',yaxis_data = y4)
bar.set_global_opts(title_opts = opts.TitleOpts(title = 'WONDERLAND',subtitle='副标题'))
bar.render_notebook()

pyechart之主题_第15张图片

你可能感兴趣的:(pyechart之主题)