设置纵横比时,Imshow在子图之间增加填充

时间:2014-04-10 14:07:46

标签: python subplot imshow

我有一个看起来像这样的问题: 我的子情节之间的空间增加......有人可以帮助我吗?

enter image description here

这是我的代码

fig=pl.figure(num=None, figsize=(15, 10), dpi=300)
font = {'weight' : 'normal',
    'size'   : 13}
matplotlib.rc('font', **font)   


grid = AxesGrid(fig, 
            111,
            nrows_ncols=(len(data_files),1),
            axes_pad = 1, #Doesn't chage anythig
            share_all=False,
            label_mode = "L",
            )

for i in range(len(data_files)):
    im = grid[i].imshow(data_files[i], 
                    interpolation="none",
                    aspect=aspect_ratios[i]) #I have a list with the aspect ratios of the matrices
    grid[i].set_adjustable('box-forced') #needed to fit de matrices in the plots...
pl.show()

0 个答案:

没有答案