1
我有一个matplotlib图,这实际上是两个不同高度的子图,看起来像一个单独的不连贯图。分享Y轴标签
我已经这样做了使用Gridspec:
outer = gridspec.GridSpec(2, 1, height_ratios=[1,3])
gs1 = gridspec.GridSpecFromSubplotSpec(1, 1, subplot_spec = outer[0])
ax1 = plt.subplot(gs1[0])
ax1.plot(no_rot,max_sd,'k*')
plt.ylabel('Y Axis Label')
gs2 = gridspec.GridSpecFromSubplotSpec(1, 1, subplot_spec = outer[1])
ax2 = plt.subplot(gs2[0])
ax2.plot(no_rot,max_sd,'k*')
plt.xlabel('X Axis Label')
plt.ylabel('Y Axis Label')
我现在只想有一个共享的,集中式的Y轴的标签,但我不知道如何做到这一点。