From 4adfb31c357e9e513c5ec14767cdce1b93bf6fae Mon Sep 17 00:00:00 2001 From: David Stansby Date: Wed, 15 Nov 2017 16:46:07 +0000 Subject: [PATCH] Link GridSpec docs to SubplotParams paramter descriptions --- lib/matplotlib/gridspec.py | 21 +++++++++++++++++---- 1 file changed, 17 insertions(+), 4 deletions(-) diff --git a/lib/matplotlib/gridspec.py b/lib/matplotlib/gridspec.py index 999dbd8c2029..cd9d6ebbf5e3 100644 --- a/lib/matplotlib/gridspec.py +++ b/lib/matplotlib/gridspec.py @@ -29,6 +29,7 @@ import numpy as np + class GridSpecBase(object): """ A base class of GridSpec that specifies the geometry of the grid @@ -187,9 +188,21 @@ def __init__(self, nrows, ncols, wspace=None, hspace=None, width_ratios=None, height_ratios=None): """ - The number of rows and number of columns of the - grid need to be set. Optionally, the subplot layout parameters - (e.g., left, right, etc.) can be tuned. + The number of rows and number of columns of the grid need to be set. + Optionally, the subplot layout parameters (e.g., left, right, etc.) + can be tuned. + + Parameters + ---------- + nrows : int + Number of rows in grid. + + ncols : int + Number or columns in grid. + + Notes + ----- + See `~.figure.SubplotParams` for descriptions of the layout parameters. """ self.left = left self.bottom = bottom @@ -239,7 +252,7 @@ def update(self, **kwargs): def get_subplot_params(self, fig=None): """ - return a dictionary of subplot layout parameters. The default + Return a dictionary of subplot layout parameters. The default parameters are from rcParams unless a figure attribute is set. """ from matplotlib.figure import SubplotParams