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軸的標籤,但我不知道如何做到這一點。