From b4529af2e7cd107563c6b016445b8a8436442259 Mon Sep 17 00:00:00 2001 From: Nelle Varoquaux Date: Wed, 8 Aug 2018 09:52:49 -0700 Subject: [PATCH 1/3] DOC documented more of the gridspec options --- lib/matplotlib/gridspec.py | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/lib/matplotlib/gridspec.py b/lib/matplotlib/gridspec.py index 9e4faa2b98a9..cd5bf292e1f9 100644 --- a/lib/matplotlib/gridspec.py +++ b/lib/matplotlib/gridspec.py @@ -196,6 +196,28 @@ def __init__(self, nrows, ncols, figure=None, ncols : int Number or columns in grid. + figure : ~.figure.Figure + + left : float + The left side of the subplots of the figure. + + right : float + The right side of the subplots of the figure. + + bottom : float + The bottom of the subplots of the figure. + + top : float + The top of the subplots of the figure. + + wspace : float + The amount of width reserved for space between subplots, + expressed as a fraction of the average axis width. + + hspace : float + The amount of height reserved for space between subplots, + expressed as a fraction of the average axis height. + Notes ----- See `~.figure.SubplotParams` for descriptions of the layout parameters. From b924709cadd6dfe56a11dd64b4d574843a926874 Mon Sep 17 00:00:00 2001 From: Nelle Varoquaux Date: Wed, 8 Aug 2018 10:35:50 -0700 Subject: [PATCH 2/3] DOC Better description of left, right, top, bottom --- lib/matplotlib/gridspec.py | 17 +++++------------ 1 file changed, 5 insertions(+), 12 deletions(-) diff --git a/lib/matplotlib/gridspec.py b/lib/matplotlib/gridspec.py index cd5bf292e1f9..374ea6f76e17 100644 --- a/lib/matplotlib/gridspec.py +++ b/lib/matplotlib/gridspec.py @@ -196,19 +196,12 @@ def __init__(self, nrows, ncols, figure=None, ncols : int Number or columns in grid. - figure : ~.figure.Figure + figure : ~.figure.Figure, optional - left : float - The left side of the subplots of the figure. - - right : float - The right side of the subplots of the figure. - - bottom : float - The bottom of the subplots of the figure. - - top : float - The top of the subplots of the figure. + left, right, top, bottom : float + Extent of the subplots as a fraction of figure width. + Left cannot be larger than right, and bottom cannot be larger than + top. wspace : float The amount of width reserved for space between subplots, From 1cd174e3a44d878baf5f0111b4dc1eac31571ca3 Mon Sep 17 00:00:00 2001 From: Jody Klymak Date: Wed, 8 Aug 2018 12:26:23 -0700 Subject: [PATCH 3/3] Small edit to take into account height as well --- lib/matplotlib/gridspec.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/matplotlib/gridspec.py b/lib/matplotlib/gridspec.py index 374ea6f76e17..9afe44acd5d1 100644 --- a/lib/matplotlib/gridspec.py +++ b/lib/matplotlib/gridspec.py @@ -199,7 +199,7 @@ def __init__(self, nrows, ncols, figure=None, figure : ~.figure.Figure, optional left, right, top, bottom : float - Extent of the subplots as a fraction of figure width. + Extent of the subplots as a fraction of figure width or height. Left cannot be larger than right, and bottom cannot be larger than top.