import matplotlib.pyplot as plt # 这两行代码解决 plt 中文显示的问题 plt.rcParams['font.sans-serif'] = ['SimHei'] plt.rcParams['axes.unicode_minus'] = False waters = ('伊朗', '阿联酋', '阿曼', '卡塔尔', '日本', '澳大利亚') buy_number = [3, 4, 5, 5, 6, 6] for a, b in zip(waters, buy_number): plt.text(a, b+0.05, '%.0f' % b, ha='center', va= 'bottom',fontsize=11) plt.bar(waters, buy_number) plt.title('小组赛铜墙铁壁榜') plt.show() 效果如图