Skip to content

Commit daf9e71

Browse files
authored
Merge pull request #9790 from dstansby/gridspec-link
Link GridSpec docs to SubplotParams paramter descriptions
2 parents 4ed9996 + 4adfb31 commit daf9e71

File tree

1 file changed

+17
-4
lines changed

1 file changed

+17
-4
lines changed

lib/matplotlib/gridspec.py

Lines changed: 17 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@
2929

3030
import numpy as np
3131

32+
3233
class GridSpecBase(object):
3334
"""
3435
A base class of GridSpec that specifies the geometry of the grid
@@ -187,9 +188,21 @@ def __init__(self, nrows, ncols,
187188
wspace=None, hspace=None,
188189
width_ratios=None, height_ratios=None):
189190
"""
190-
The number of rows and number of columns of the
191-
grid need to be set. Optionally, the subplot layout parameters
192-
(e.g., left, right, etc.) can be tuned.
191+
The number of rows and number of columns of the grid need to be set.
192+
Optionally, the subplot layout parameters (e.g., left, right, etc.)
193+
can be tuned.
194+
195+
Parameters
196+
----------
197+
nrows : int
198+
Number of rows in grid.
199+
200+
ncols : int
201+
Number or columns in grid.
202+
203+
Notes
204+
-----
205+
See `~.figure.SubplotParams` for descriptions of the layout parameters.
193206
"""
194207
self.left = left
195208
self.bottom = bottom
@@ -239,7 +252,7 @@ def update(self, **kwargs):
239252

240253
def get_subplot_params(self, fig=None):
241254
"""
242-
return a dictionary of subplot layout parameters. The default
255+
Return a dictionary of subplot layout parameters. The default
243256
parameters are from rcParams unless a figure attribute is set.
244257
"""
245258
from matplotlib.figure import SubplotParams

0 commit comments

Comments
 (0)