Skip to content

Link GridSpec docs to SubplotParams paramter descriptions #9790

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
Nov 17, 2017
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
21 changes: 17 additions & 4 deletions lib/matplotlib/gridspec.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@

import numpy as np


class GridSpecBase(object):
"""
A base class of GridSpec that specifies the geometry of the grid
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down