介绍 在使用Matplotlib画图的时候,想给柱状图(bar)加点文字标签,找到函数bar_label可以干这个事,但是报错如下: ..... AttributeError: 'AxesSubplot' object has no attribute 'bar_label' 解决方案 升级Matplotlib版本至3.4及以上。