【发布时间】:2015-05-13 03:11:09
【问题描述】:
我正在 python (v 2.7.9) 中使用 matplotlib (v 1.4.2) 绘制子图网格。我可以手动调整子图之间的间距,但我想要一些子图的间距不同。我希望的最终图是左侧的 2x5 子图网格,右侧 2x5 子图的网格,中间有一个空格。
我用来控制图形布局的代码如下:
figw, figh = 16.5, 15.0 #18.5, 15.0
fig, axes = plt.subplots(ncols=4, nrows=5, sharex=False,
sharey=True, figsize=(figw, figh))
plt.subplots_adjust(hspace=0.0, wspace=0.2, left=1/figw,
right=1-2./figw, bottom=1/figh, top=1-2./figh)
当我更改 wspace 时,我得到 4 列均等距。有没有办法更改wspace,使其在第 0 列和第 1 列之间为 0,在 1 和 2 之间为 x,在 2 和 3 之间为 0?
谢谢。
【问题讨论】:
标签: python python-2.7 matplotlib subplot