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
| 25 | |
| 26 | |
| 27 | class 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`. |
no outgoing calls
searching dependent graphs…