mpl_工具包.轴_分割器.HBox分割器#

class mpl_toolkits.axes_grid1.axes_divider.HBoxDivider(fig, *args, horizontal=None, vertical=None, aspect=None, anchor='C')[源代码][源代码]#

基类:SubplotDivider

一个用于水平布局轴的 SubplotDivider,同时确保它们具有相同的高度。

示例

(Source code, 2x.png, png)

(2x.png, png)

参数:
fig
*args : 元组 (nrows, ncols, index) 或 整数tuple (nrows, ncols, index) or int

图中子图阵列的维度为 (nrows, ncols),而 index 是正在创建的子图的索引。index 从左上角的 1 开始,并向右增加。

如果 nrowsncolsindex 都是个位数,那么 args 可以作为一个单独的 3 位数传递(例如,234 表示 (2, 3, 4))。

horizontal : axes_size 的列表, 可选列表

水平分割的大小。

垂直 : axes_size 的列表, 可选列表

垂直分割的大小。

方面bool, 可选

整个矩形区域是否被缩小,使得水平和垂直比例尺的相对部分具有相同的比例。

锚点(float, float) 或 {'C', 'SW', 'S', 'SE', 'E', 'NE', 'N', 'NW', 'W'},默认值:'C'

aspect 为 True 时,缩减矩形的放置位置。

new_locator(nx, nx1=None)[源代码][源代码]#

为指定的单元格创建一个轴定位可调用对象。

参数:
nx, nx1整数

指定单元格列位置的整数。当 nx1 为 None 时,指定单个 nx 列。否则,指定从 nxnx1 之间的列位置(但不包括 nx1 列)。

使用 mpl_toolkits.axes_grid1.axes_divider.HBoxDivider 的示例#

HBoxDivider 和 VBoxDivider 演示

HBoxDivider and VBoxDivider demo