Skip to content

Use numpydoc for GridSpecFromSubplotSpec.__init__ #21012

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Sep 7, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 13 additions & 5 deletions lib/matplotlib/gridspec.py
Original file line number Diff line number Diff line change
Expand Up @@ -490,11 +490,19 @@ def __init__(self, nrows, ncols,
wspace=None, hspace=None,
height_ratios=None, width_ratios=None):
"""
The number of rows and number of columns of the grid need to
be set. An instance of SubplotSpec is also needed to be set
from which the layout parameters will be inherited. The wspace
and hspace of the layout can be optionally specified or the
default values (from the figure or rcParams) will be used.
Parameters
----------
nrows, ncols : int
Number of rows and number of columns of the grid.
subplot_spec : SubplotSpec
Spec from which the layout parameters are inherited.
wspace, hspace : float, optional
See `GridSpec` for more details. If not specified default values
(from the figure or rcParams) are used.
height_ratios : array-like of length *nrows*, optional
See `GridSpecBase` for details.
width_ratios : array-like of length *ncols*, optional
See `GridSpecBase` for details.
"""
self._wspace = wspace
self._hspace = hspace
Expand Down