python画直方图小结
# -*- coding: utf-8 -*-import matplotlib.pyplot as plt#显示中文plt.rcParams['font.family']=['sans-serif']plt.rcParams['font.sans-serif']=['SimHei']x=[2017, 2018, 2019, 2020]y=[2.0772,2.942,3.2828,3.3773]#color可用16进制,zorder使参考线不覆盖直方图,类似图层plt.bar(x, y,
原创
2022-03-06 20:43:33 ·
538 阅读 ·
0 评论