我希望在水平方向上调整子图之间的间距。特别是在每隔一行之间。我可以使用fig.subplots_adjust(hspace=n)调整每一行。但是,是否可以将此应用于每2行?
import matplotlib.pyplot as plt
fig, ax = plt.subplots(figsize = (10,10))
plt.style.use('ggplot')
ax.grid(False)
ax1 = plt.subplot2grid((5,2), (0, 0))
ax2 = plt.subplot2grid((5,2), (0, 1))
ax3 = plt.subplot2grid((5,2), (1, 0))  
ax4 = plt.subplot2grid((5,2), (1, 1))
ax5 = plt.subplot2grid((5,2), (2, 0))
ax6 = plt.subplot2grid((5,2), (2, 1)) 
ax7 = plt.subplot2grid((5,2), (3, 0))
ax8 = plt.subplot2grid((5,2), (3, 1))
fig.subplots_adjust(hspace=0.9)使用下面的子图,我希望在第2行和第3行之间添加一个空格,并保持其余行不变。

https://stackoverflow.com/questions/51717199
复制相似问题