'AxesSubplot' object has no attribute 'set_xlable'

'AxesSubplot' object has no attribute 'set_xlable'

这个bug真是浪费了我好久时间,特记录一下警示自己!!!!
在这里插入图片描述
解决办法:
其实就是拼写弄错了。
'AxesSubplot' object has no attribute 'set_xlable'_第1张图片
以上是正确的写法,仔细检查哪里有问题。
我的就是从

set_xLabel -->set_xLble --> set_xlable-->set_xlabel

总结网上的错误,大部分也就是这个问题。
刚开始有问题时我就纳闷了,jupyter notebook提示的也没错啊,编译就有问题了,原来还是拼写有问题,所以一定要仔细!!!!!

附matplotlib.axis网页文档;
https://matplotlib.org/api/axes_api.html#axis-labels-title-and-legend

你可能感兴趣的:(python)