如果是matplotlib 3.4.0以上版本可以使用类似
p1 = plt.bar(1,10,label='x')
plt.bar_label(p1, label_type='center')
如果不是,需要使用plt.text()函数。
改成英文试试