数据可视化之matplotlib实战:plt.bar()函数 绘制柱状图
import matplotlib as mplimport matplotlib.pyplot as plt# 防止乱码mpl.rcParams["font.sans-serif"] = ["SimHei"]mpl.rcParams["axes.unicode_minus"] = False# 生产数据x = [1,2,3,4,5,6,7,8]y = [3,1,4,5,7,9,7,2]# 生产柱状图plt.bar(x,y,align=