mpl_toolkits.axes_grid1.axes_divider.SubplotDivider#
- class mpl_toolkits.axes_grid1.axes_divider.SubplotDivider(fig, *args, horizontal=None, vertical=None, aspect=None, anchor='C')[source]#
基类:
Divider
其矩形区域由子图几何形状指定的 Divider 类。
- 参数:
- fig
Figure
- *argstuple (nrows, ncols, index) 或 int
图中子图数组的维度为
(nrows, ncols)
,而 index 是正在创建的子图的索引。index 从左上角的 1 开始,向右递增。如果 nrows、ncols 和 index 都是一位数字,则 args 可以作为单个三位数字传递(例如 234 代表 (2, 3, 4))。
- horizontallist of
axes_size
, 可选 水平划分的尺寸。
- verticallist of
axes_size
, 可选 垂直划分的尺寸。
- aspectbool, 可选
是否缩小整个矩形区域,使得水平和垂直刻度的相对部分具有相同的比例。
- anchor(float, float) or {'C', 'SW', 'S', 'SE', 'E', 'NE', 'N', 'NW', 'W'}, 默认值: 'C'
当 aspect 为 True 时,缩小矩形的位置。
- fig