matplotlib回顾之并列柱状图与多子图绘制
# encoding=utf8'''并列柱状图'''import matplotlib.pyplot as pltimport numpy as npplt.rcParams['font.sans-serif']=['SimHei'] # 解决乱码label=['oppo','vivo','小米','honor']data=[40,30,20,10]data2=[20,40,60,80]x=np.arange(4)+0.3 # 并列柱状图的关键,代表x轴位置width=0.3pl