我试图用matplot lib绘制我的数据。我有3个separetes组数据我想在3个次要情节绘制(我用this是我指导做好):在matplotlib中设置错误条的显示范围sup
plt.figure()
fig, axs = plt.subplots(nrows=3, ncols = 1, sharex=False)
ax1 = axs[0]
ax1.errorbar(X,Y,Err,fmt='o')
ax1.set_xscale('log')
ax1.set_yscale('log')
ax1.set_title('epsilon=1.5, kappa = 2')
plt.show()
但是我从1 X系列(或0,我不知道)到100,我想减少它。我试图this,通过添加:
ax1.xlim(0.5,13.5)
但我得到一个错误:
AttributeError: 'AxesSubplot' object has no attribute 'xlim'
我怎样才能改变的范围呢?