2
我使用AxesGrid类做图,看起来像这样的:AxesGrid与imshow:做的地块必须有相同的程度?
的代码基本上是这样的:
grid = AxesGrid(fig,
111,
nrows_ncols = (2,2),
axes_pad = 0.50,
label_mode = "all",
cbar_location='right',
cbar_mode='single',
cbar_pad =0.3,
cbar_size='5%'
)
,然后对4个板我称之为imshow和轮廓是这样的:
# some definitions etc.
im1 = grid[0].imshow(np.transpose(De[i1:i2,j1:j2]),
aspect='equal',
vmin=vmin, vmax = vmax,
origin='lower',
extent=extent)
# some other stuff [...]
grid[0].contour(np.transpose(F[i1:i2,j1:j2]),levels=levls,
extent=extent,colors='k',cmap=None)
# and so on for the 3 other panels
唯一的区别是,现在,我想的图像,以具有用于程度的关键字不同的值。 说我希望右上图像具有的程度(31.5,35.5,11,14)和右下面板以具有的程度(29.5,33.5,11,14),I得到这样的:
似乎matplotlib调整轴。有没有办法指定我想要的范围,而不是在我的数据和斧头之间留有空白空间?