MCPcopy Index your code
hub / github.com/matplotlib/matplotlib / __init__

Method __init__

lib/mpl_toolkits/axes_grid1/axes_grid.py:61–172  ·  view source on GitHub ↗

Parameters ---------- fig : `.Figure` The parent figure. rect : (float, float, float, float), (int, int, int), int, or \ `~.SubplotSpec` The axes position, as a ``(left, bottom, width, height)`` tuple, as a three-digit subplot

(self, fig,
                 rect,
                 nrows_ncols,
                 n_axes=None,
                 direction="row",
                 axes_pad=0.02,
                 *,
                 share_all=False,
                 share_x=True,
                 share_y=True,
                 label_mode="L",
                 axes_class=None,
                 aspect=False,
                 )

Source from the content-addressed store, hash-verified

59
60 @_api.rename_parameter("3.11", "ngrids", "n_axes")
61 def __init__(self, fig,
62 rect,
63 nrows_ncols,
64 n_axes=None,
65 direction="row",
66 axes_pad=0.02,
67 *,
68 share_all=False,
69 share_x=True,
70 share_y=True,
71 label_mode="L",
72 axes_class=None,
73 aspect=False,
74 ):
75 """
76 Parameters
77 ----------
78 fig : `.Figure`
79 The parent figure.
80 rect : (float, float, float, float), (int, int, int), int, or \
81 `~.SubplotSpec`
82 The axes position, as a ``(left, bottom, width, height)`` tuple,
83 as a three-digit subplot position code (e.g., ``(1, 2, 1)`` or
84 ``121``), or as a `~.SubplotSpec`.
85 nrows_ncols : (int, int)
86 Number of rows and columns in the grid.
87 n_axes : int, optional
88 If given, only the first *n_axes* axes in the grid are created.
89 direction : {"row", "column"}, default: "row"
90 Whether axes are created in row-major ("row by row") or
91 column-major order ("column by column"). This also affects the
92 order in which axes are accessed using indexing (``grid[index]``).
93 axes_pad : float or (float, float), default: 0.02
94 Padding or (horizontal padding, vertical padding) between axes, in
95 inches.
96 share_all : bool, default: False
97 Whether all axes share their x- and y-axis. Overrides *share_x*
98 and *share_y*.
99 share_x : bool, default: True
100 Whether all axes of a column share their x-axis.
101 share_y : bool, default: True
102 Whether all axes of a row share their y-axis.
103 label_mode : {"L", "1", "all", "keep"}, default: "L"
104 Determines which axes will get tick labels:
105
106 - "L": All axes on the left column get vertical tick labels;
107 all axes on the bottom row get horizontal tick labels.
108 - "1": Only the bottom left axes is labelled.
109 - "all": All axes are labelled.
110 - "keep": Do not do anything.
111
112 axes_class : subclass of `matplotlib.axes.Axes`, default: `.mpl_axes.Axes`
113 The type of Axes to create.
114 aspect : bool, default: False
115 Whether the axes aspect ratio follows the aspect ratio of the data
116 limits.
117 """
118 self._nrows, self._ncols = nrows_ncols

Callers 2

__init__Method · 0.45
__init__Method · 0.45

Calls 7

_get_col_rowMethod · 0.95
_init_locatorsMethod · 0.95
set_label_modeMethod · 0.95
SubplotDividerClass · 0.85
DividerClass · 0.85
add_axesMethod · 0.80
get_positionMethod · 0.45

Tested by

no test coverage detected