最佳答案
您需要使用 gridspec
子模块:
fig = pyplot.figure(figsize=(6, 4))
gs = gridspec.GridSpec(nrows=6, ncols=2)
ax11 = fig.add_subplot(gs[:2, 0])
ax21 = fig.add_subplot(gs[2:4, 0])
ax31 = fig.add_subplot(gs[4:, 0])
ax12 = fig.add_subplot(gs[:3, 1])
ax22 = fig.add_subplot(gs[3:, 1])
fig.tight_layout()
关于python - matplotlib add_subplot 奇数个地 block ,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/41025187/