MCPcopy
hub / github.com/matplotlib/matplotlib / __init__

Method __init__

lib/mpl_toolkits/axes_grid1/axes_grid.py:298–401  ·  view source on GitHub ↗

Parameters ---------- fig : `.Figure` The parent figure. rect : (float, float, float, float) or int The axes position, as a ``(left, bottom, width, height)`` tuple or as a three-digit subplot position code (e.g., "121"). nr

(self, fig,
                 rect,
                 nrows_ncols,
                 n_axes=None,
                 direction="row",
                 axes_pad=0.02,
                 *,
                 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,
                 )

Source from the content-addressed store, hash-verified

296 """
297
298 def __init__(self, fig,
299 rect,
300 nrows_ncols,
301 n_axes=None,
302 direction="row",
303 axes_pad=0.02,
304 *,
305 share_all=False,
306 aspect=True,
307 label_mode="L",
308 cbar_mode=None,
309 cbar_location="right",
310 cbar_pad=None,
311 cbar_size="5%",
312 cbar_set_cax=True,
313 axes_class=None,
314 ):
315 """
316 Parameters
317 ----------
318 fig : `.Figure`
319 The parent figure.
320 rect : (float, float, float, float) or int
321 The axes position, as a ``(left, bottom, width, height)`` tuple or
322 as a three-digit subplot position code (e.g., "121").
323 nrows_ncols : (int, int)
324 Number of rows and columns in the grid.
325 n_axes : int, optional
326 If given, only the first *n_axes* axes in the grid are created.
327 direction : {"row", "column"}, default: "row"
328 Whether axes are created in row-major ("row by row") or
329 column-major order ("column by column"). This also affects the
330 order in which axes are accessed using indexing (``grid[index]``).
331 axes_pad : float or (float, float), default: 0.02in
332 Padding or (horizontal padding, vertical padding) between axes, in
333 inches.
334 share_all : bool, default: False
335 Whether all axes share their x- and y-axis. Note that in any case,
336 all axes in a column share their x-axis and all axes in a row share
337 their y-axis.
338 aspect : bool, default: True
339 Whether the axes aspect ratio follows the aspect ratio of the data
340 limits.
341 label_mode : {"L", "1", "all"}, default: "L"
342 Determines which axes will get tick labels:
343
344 - "L": All axes on the left column get vertical tick labels;
345 all axes on the bottom row get horizontal tick labels.
346 - "1": Only the bottom left axes is labelled.
347 - "all": all axes are labelled.
348
349 cbar_mode : {"each", "single", "edge", None}, default: None
350 Whether to create a colorbar for "each" axes, a "single" colorbar
351 for the entire grid, colorbars only for axes on the "edge"
352 determined by *cbar_location*, or no colorbars. The colorbars are
353 stored in the :attr:`!cbar_axes` attribute.
354 cbar_location : {"left", "right", "bottom", "top"}, default: "right"
355 cbar_pad : float, default: None

Callers

nothing calls this directly

Calls 3

add_axesMethod · 0.80
_get_col_rowMethod · 0.80
__init__Method · 0.45

Tested by

no test coverage detected