@@ -35,13 +35,13 @@ def _nicetitle(coord, value, maxchar, template):
35
35
36
36
class FacetGrid :
37
37
"""
38
- Initialize the matplotlib figure and FacetGrid object.
38
+ Initialize the Matplotlib figure and FacetGrid object.
39
39
40
40
The :class:`FacetGrid` is an object that links a xarray DataArray to
41
- a matplotlib figure with a particular structure.
41
+ a Matplotlib figure with a particular structure.
42
42
43
43
In particular, :class:`FacetGrid` is used to draw plots with multiple
44
- Axes where each Axes shows the same relationship conditioned on
44
+ axes, where each axes shows the same relationship conditioned on
45
45
different levels of some dimension. It's possible to condition on up to
46
46
two variables by assigning variables to the rows and columns of the
47
47
grid.
@@ -59,19 +59,19 @@ class FacetGrid:
59
59
60
60
Attributes
61
61
----------
62
- axes : numpy object array
63
- Contains axes in corresponding position, as returned from
64
- plt. subplots
65
- col_labels : list
66
- list of :class:`matplotlib.text.Text` instances corresponding to column titles.
67
- row_labels : list
68
- list of :class:`matplotlib.text.Text` instances corresponding to row titles.
69
- fig : matplotlib.Figure
70
- The figure containing all the axes
71
- name_dicts : numpy object array
72
- Contains dictionaries mapping coordinate names to values. None is
73
- used as a sentinel value for axes which should remain empty, ie.
74
- sometimes the bottom right grid
62
+ axes : ndarray of matplotlib.axes.Axes
63
+ Array containing axes in corresponding position, as returned from
64
+ :py:func:`matplotlib.pyplot. subplots`.
65
+ col_labels : list of matplotlib.text.Text
66
+ Column titles.
67
+ row_labels : list of matplotlib.text.Text
68
+ Row titles.
69
+ fig : matplotlib.figure. Figure
70
+ The figure containing all the axes.
71
+ name_dicts : ndarray of dict
72
+ Array containing dictionaries mapping coordinate names to values. `` None`` is
73
+ used as a sentinel value for axes that should remain empty, i.e.,
74
+ sometimes the rightmost grid positions in the bottom row.
75
75
"""
76
76
77
77
def __init__ (
@@ -91,26 +91,28 @@ def __init__(
91
91
Parameters
92
92
----------
93
93
data : DataArray
94
- xarray DataArray to be plotted
95
- row, col : strings
94
+ xarray DataArray to be plotted.
95
+ row, col : str
96
96
Dimesion names that define subsets of the data, which will be drawn
97
97
on separate facets in the grid.
98
98
col_wrap : int, optional
99
- "Wrap" the column variable at this width, so that the column facets
99
+ "Wrap" the grid the for the column variable after this number of columns,
100
+ adding rows if ``col_wrap`` is less than the number of facets.
100
101
sharex : bool, optional
101
- If true, the facets will share x axes
102
+ If true, the facets will share *x* axes.
102
103
sharey : bool, optional
103
- If true, the facets will share y axes
104
+ If true, the facets will share *y* axes.
104
105
figsize : tuple, optional
105
106
A tuple (width, height) of the figure in inches.
106
107
If set, overrides ``size`` and ``aspect``.
107
108
aspect : scalar, optional
108
109
Aspect ratio of each facet, so that ``aspect * size`` gives the
109
- width of each facet in inches
110
+ width of each facet in inches.
110
111
size : scalar, optional
111
- Height (in inches) of each facet. See also: ``aspect``
112
+ Height (in inches) of each facet. See also: ``aspect``.
112
113
subplot_kws : dict, optional
113
- Dictionary of keyword arguments for matplotlib subplots
114
+ Dictionary of keyword arguments for Matplotlib subplots
115
+ (:py:func:`matplotlib.pyplot.subplots`).
114
116
115
117
"""
116
118
@@ -431,7 +433,7 @@ def add_legend(self, **kwargs):
431
433
self ._adjust_fig_for_guide (self .figlegend )
432
434
433
435
def add_colorbar (self , ** kwargs ):
434
- """Draw a colorbar"""
436
+ """Draw a colorbar. """
435
437
kwargs = kwargs .copy ()
436
438
if self ._cmap_extend is not None :
437
439
kwargs .setdefault ("extend" , self ._cmap_extend )
@@ -564,7 +566,7 @@ def set_titles(self, template="{coord} = {value}", maxchar=30, size=None, **kwar
564
566
565
567
def set_ticks (self , max_xticks = _NTICKS , max_yticks = _NTICKS , fontsize = _FONTSIZE ):
566
568
"""
567
- Set and control tick behavior
569
+ Set and control tick behavior.
568
570
569
571
Parameters
570
572
----------
0 commit comments