Skip to content

Commit

Permalink
Merge pull request matplotlib#27962 from timhoffm/doc-grid
Browse files Browse the repository at this point in the history
DOC: Document axes_grid1.Grid attributes
  • Loading branch information
QuLogic authored and timhoffm committed Mar 27, 2024
2 parents 975b584 + 5a2e809 commit 81e8026
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 4 deletions.
4 changes: 2 additions & 2 deletions lib/matplotlib/axes/_axes.py
Original file line number Diff line number Diff line change
Expand Up @@ -3058,7 +3058,7 @@ def stem(self, *args, linefmt=None, markerfmt=None, basefmt=None, bottom=0,
bottom : float, default: 0
The y/x-position of the baseline (depending on *orientation*).
label : str, default: None
label : str, optional
The label to use for the stems in legends.
data : indexable object, optional
Expand Down Expand Up @@ -6831,7 +6831,7 @@ def hist(self, x, bins=None, range=None, density=False, weights=None,
Color or sequence of colors, one per dataset. Default (``None``)
uses the standard line color sequence.
label : str or None, default: None
label : str or list of str, optional
String, or sequence of strings to match multiple datasets. Bar
charts yield multiple patches per dataset, but only the first gets
the label, so that `~.Axes.legend` will work as expected.
Expand Down
23 changes: 22 additions & 1 deletion lib/mpl_toolkits/axes_grid1/axes_grid.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,26 @@ class Grid:
displayed with a given aspect ratio; for example, it is difficult to
display multiple images of a same size with some fixed padding between
them. AxesGrid can be used in such case.
Attributes
----------
axes_all : list of Axes
A flat list of Axes. Note that you can also access this directly
from the grid. The following is equivalent ::
grid[i] == grid.axes_all[i]
len(grid) == len(grid.axes_all)
axes_column : list of list of Axes
A 2D list of Axes where the first index is the column. This results
in the usage pattern ``grid.axes_column[col][row]``.
axes_row : list of list of Axes
A 2D list of Axes where the first index is the row. This results
in the usage pattern ``grid.axes_row[row][col]``.
axes_llc : Axes
The Axes in the lower left corner.
ngrids : int
Number of Axes in the grid.
"""

_defaultAxesClass = Axes
Expand Down Expand Up @@ -93,7 +113,8 @@ def __init__(self, fig,
- "all": All axes are labelled.
- "keep": Do not do anything.
axes_class : subclass of `matplotlib.axes.Axes`, default: None
axes_class : subclass of `matplotlib.axes.Axes`, default: `.mpl_axes.Axes`
The type of Axes to create.
aspect : bool, default: False
Whether the axes aspect ratio follows the aspect ratio of the data
limits.
Expand Down
2 changes: 1 addition & 1 deletion lib/mpl_toolkits/mplot3d/axes3d.py
Original file line number Diff line number Diff line change
Expand Up @@ -3610,7 +3610,7 @@ def stem(self, x, y, z, *, linefmt='C0-', markerfmt='C0o', basefmt='C3-',
bottom : float, default: 0
The position of the baseline, in *orientation*-coordinates.
label : str, default: None
label : str, optional
The label to use for the stems in legends.
orientation : {'x', 'y', 'z'}, default: 'z'
Expand Down

0 comments on commit 81e8026

Please sign in to comment.