ValueError: The number of FixedLocator locations (13), usually from a call to set_ticks, does not ma

ValueError: The number of FixedLocator locations (13), usually from a call to set_ticks, does not match the number of ticklabels (12).

代码

plt.xticks(np.arange(0, 731, 60), Y_tick , rotation=30)

报错信息

ValueError: The number of FixedLocator locations (13), usually from a call to set_ticks, does not match the number of ticklabels (12).

解决方法

pip install -i https://pypi.douban.com/simple matplotlib==3.0.3

之前版本matplotlib 3.3.4, 现在版本matplotlib 3.0.3

欢迎大家交流学习,任何问题都可以留言

你可能感兴趣的:(日常报错,python,bug)