以下将创建10个子批次:
ax1 = plt.subplot2grid((4, 8), (0, 0), colspan=4, rowspan=2)
ax2 = plt.subplot2grid((4, 8), (0, 4), colspan=2, rowspan=1)
ax3 = plt.subplot2grid((4, 8), (0, 6), colspan=2, rowspan=1)
ax4 = plt.subplot2grid((4, 8), (1, 4), colspan=2, rowspan=1)
ax9 = plt.subplot2grid((4, 8), (1, 6), colspan=2, rowspan=1)
ax5 = plt.subplot2grid((4, 8), (2, 0), colspan=4, rowspan=2)
ax6 = plt.subplot2grid((4, 8), (2, 4), colspan=2, rowspan=1)
ax7 = plt.subplot2grid((4, 8), (2, 6), colspan=2, rowspan=1)
ax8 = plt.subplot2grid((4, 8), (3, 4), colspan=2, rowspan=1)
ax10 = plt.subplot2grid((4, 8),(3, 6), colspan=2, rowspan=1)
我想在顶部的一组子窗口和底部的一组子窗口之间添加一行空间。我尝试按如下方式添加一行(以前对我有用,但现在由于某些原因现在不行),并将底部的所有子窗口向下移动一行:
^{pr2}$但是,它为我生成了两个我没有在这两个空行中请求的空子批(总共给我12个子批)。我只想要两组之间的空行或间距。在
以下是使用
gridspec
获得所需内容的方法:结果如下:
相关问题 更多 >
编程相关推荐