GridSpec参数
wspace和与
hspace不兼容
plt.tight_layout。您可以使用
tight_layout或指定间距。
如果要使用GridSpec,则有两个选择:
- 删除线
plt.tight_layout
- 删除线
gspec.update(wspace = .6, hspace = .6)
原因
fig, ((ax1,ax2),(ax3, ax4)) = plt.subplots(2, 2, sharey = True)ax = [ax1, ax2, ax3, ax4]
因此,有效的方法是您不设置任何wspace或hspace。



