我试着分享我的sumplots的x轴和y轴,我尝试了几种不同的方法来使用sharey和sharex,但是没有得到正确的结果。在
ax0 = plt.subplot(4,1,1)
for i in range(4):
plt.subplot(4,1,i+1,sharex = ax0)
plt.plot(wavelength[i],flux)
plt.xlim([-1000,1000])
plt.ylim([0,1.5])
plt.subplots_adjust(wspace=0, hspace=0)
plt.show()
Tags:
如果你能正确地理解x轴和y轴。这可以用plt.subplots和关键字}来实现。参见以下示例:
sharex=True
和{相关问题 更多 >
编程相关推荐