SOS最近忙毕设的故障诊断,复制了别人的代码应该是版本不回应,出现了好多问题,下面这个找了很多还是无法解决

问题遇到的现象和发生背景
问题相关代码,请勿粘贴截图

img

运行结果及报错内容

ValueError: The number of FixedLocator locations (9), usually from a call to set_ticks, does not match the number of ticklabels (10).
Process finished with exit code 1

我的解答思路和尝试过的方法
我想要达到的结果

如果要限制xy轴显示范围,可以用

X坐标范围

plt.xlim(100,201)
如有用请采纳