Initialize the Matplotlib figure and FacetGrid object. The :class:`FacetGrid` is an object that links an xarray DataArray to a Matplotlib figure with a particular structure. In particular, :class:`FacetGrid` is used to draw plots with multiple axes, where each axes shows the s
| 85 | |
| 86 | |
| 87 | class FacetGrid(Generic[T_DataArrayOrSet]): |
| 88 | """ |
| 89 | Initialize the Matplotlib figure and FacetGrid object. |
| 90 | |
| 91 | The :class:`FacetGrid` is an object that links an xarray DataArray to |
| 92 | a Matplotlib figure with a particular structure. |
| 93 | |
| 94 | In particular, :class:`FacetGrid` is used to draw plots with multiple |
| 95 | axes, where each axes shows the same relationship conditioned on |
| 96 | different levels of some dimension. It's possible to condition on up to |
| 97 | two variables by assigning variables to the rows and columns of the |
| 98 | grid. |
| 99 | |
| 100 | The general approach to plotting here is called "small multiples", |
| 101 | where the same kind of plot is repeated multiple times, and the |
| 102 | specific use of small multiples to display the same relationship |
| 103 | conditioned on one or more other variables is often called a "trellis |
| 104 | plot". |
| 105 | |
| 106 | The basic workflow is to initialize the :class:`FacetGrid` object with |
| 107 | the DataArray and the variable names that are used to structure the grid. |
| 108 | Then plotting functions can be applied to each subset by calling |
| 109 | :meth:`FacetGrid.map_dataarray` or :meth:`FacetGrid.map`. |
| 110 | |
| 111 | Attributes |
| 112 | ---------- |
| 113 | axs : ndarray of matplotlib.axes.Axes |
| 114 | Array containing axes in corresponding position, as returned from |
| 115 | :py:func:`matplotlib.pyplot.subplots`. |
| 116 | col_labels : list of matplotlib.text.Annotation |
| 117 | Column titles. |
| 118 | row_labels : list of matplotlib.text.Annotation |
| 119 | Row titles. |
| 120 | fig : matplotlib.figure.Figure |
| 121 | The figure containing all the axes. |
| 122 | name_dicts : ndarray of dict |
| 123 | Array containing dictionaries mapping coordinate names to values. ``None`` is |
| 124 | used as a sentinel value for axes that should remain empty, i.e., |
| 125 | sometimes the rightmost grid positions in the bottom row. |
| 126 | """ |
| 127 | |
| 128 | data: T_DataArrayOrSet |
| 129 | name_dicts: np.ndarray |
| 130 | fig: Figure |
| 131 | axs: np.ndarray |
| 132 | row_names: list[np.ndarray] |
| 133 | col_names: list[np.ndarray] |
| 134 | figlegend: Legend | None |
| 135 | quiverkey: QuiverKey | None |
| 136 | cbar: Colorbar | None |
| 137 | _single_group: bool | Hashable |
| 138 | _nrow: int |
| 139 | _row_var: Hashable | None |
| 140 | _ncol: int |
| 141 | _col_var: Hashable | None |
| 142 | _col_wrap: int | Literal["auto"] | None |
| 143 | row_labels: list[Annotation | None] |
| 144 | col_labels: list[Annotation | None] |
no outgoing calls
no test coverage detected
searching dependent graphs…