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

Class Grid

lib/mpl_toolkits/axes_grid1/axes_grid.py:27–285  ·  view source on GitHub ↗

A grid of Axes. In Matplotlib, the Axes location (and size) is specified in normalized figure coordinates. This may not be ideal for images that needs to be displayed with a given aspect ratio; for example, it is difficult to display multiple images of a same size with some fix

Source from the content-addressed store, hash-verified

25
26
27class Grid:
28 """
29 A grid of Axes.
30
31 In Matplotlib, the Axes location (and size) is specified in normalized
32 figure coordinates. This may not be ideal for images that needs to be
33 displayed with a given aspect ratio; for example, it is difficult to
34 display multiple images of a same size with some fixed padding between
35 them. AxesGrid can be used in such case.
36
37 Attributes
38 ----------
39 axes_all : list of Axes
40 A flat list of Axes. Note that you can also access this directly
41 from the grid. The following is equivalent ::
42
43 grid[i] == grid.axes_all[i]
44 len(grid) == len(grid.axes_all)
45
46 axes_column : list of list of Axes
47 A 2D list of Axes where the first index is the column. This results
48 in the usage pattern ``grid.axes_column[col][row]``.
49 axes_row : list of list of Axes
50 A 2D list of Axes where the first index is the row. This results
51 in the usage pattern ``grid.axes_row[row][col]``.
52 axes_llc : Axes
53 The Axes in the lower left corner.
54 n_axes : int
55 Number of Axes in the grid.
56 """
57
58 _defaultAxesClass = Axes
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`.

Callers 6

test_grid_axes_listsFunction · 0.90
test_grid_axes_positionFunction · 0.90
test_grid_errorsFunction · 0.90
test_grid_n_axesFunction · 0.90

Calls

no outgoing calls

Tested by 5

test_grid_axes_listsFunction · 0.72
test_grid_axes_positionFunction · 0.72
test_grid_errorsFunction · 0.72
test_grid_n_axesFunction · 0.72

Used in the wild real call sites across dependent graphs

searching dependent graphs…