mpl_toolkits.axisartist.axes_grid.ImageGrid

class mpl_toolkits.axisartist.axes_grid.ImageGrid(fig, rect, nrows_ncols, ngrids=None, direction='row', axes_pad=0.02, add_all=<deprecated parameter>, share_all=False, aspect=True, label_mode='L', cbar_mode=None, cbar_location='right', cbar_pad=None, cbar_size='5%', cbar_set_cax=True, axes_class=None)[源代码]

基类:mpl_toolkits.axes_grid1.axes_grid.ImageGrid

参数:
figFigure图形

父图形。

rect(float,float,float,float)或int

轴的位置,如 (left, bottom, width, height) 元组或作为三位数的子批次位置代码(例如“121”)。

nrows_ncols(内景,内景)

网格中的行数和列数。

ngridsint或None,默认值:None

如果没有,只有第一个 NGRADE 将创建栅格中的轴。

direction{“row”,“column”},默认值:“row”

轴是按行的主要顺序(“逐行”)还是按列的主要顺序(“逐列”)创建的。这也会影响使用索引访问轴的顺序 (grid[index]

axes_pad浮动或(浮动,浮动),默认值:0.02in

轴之间的填充或(水平填充、垂直填充),以英寸为单位。

add_allbool,默认值:True

是否使用将轴添加到图形中 Figure.add_axes . 此参数已弃用。

share_allbool,默认值:False

是否所有轴共享其x轴和y轴。

aspectbool,默认值:True

轴纵横比是否遵循数据限制的纵横比。

label_mode{“L”,“1”,“all”},默认值:“L”

确定哪些轴将获得刻度标签:

  • “L”:左栏上的所有轴都得到垂直刻度标签;最下面一行的所有坐标轴都得到水平刻度标签。
  • “1”:只有左下角的轴被标记。
  • “全部”:所有轴都有标签。
cbar_mode{“each”,“single”,“edge”,None},默认值:None

是否为“每个”轴创建颜色条,为整个网格创建“单个”颜色条,仅为“边”上的轴创建颜色条由 cbar_location ,或没有色条。色条存储在 cbar_axes 属性。

cbar_location{“left”,“right”,“bottom”,“top”},默认值:“right”
cbar_pad浮点,默认值:无

在图像轴和颜色条轴之间填充。

cbar_size :尺寸规格(参见 Size.from_any ),默认值:“5%”尺寸规格(参见

色条大小。

cbar_set_caxbool,默认值:True

如果为True,则栅格中的每个轴都具有 cax 绑定到关联 cbar_axes .

axes_class 子类 matplotlib.axes.Axes ,默认值:无亚类
__module__ = 'mpl_toolkits.axisartist.axes_grid'

使用实例 mpl_toolkits.axisartist.axes_grid.ImageGrid