Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit cd5a6d6

Browse files
committed
DOC/API: make subplot_kw and gridspec_kw kw only
Also fix grammar and rst markup
1 parent 6233726 commit cd5a6d6

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

lib/matplotlib/figure.py

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1576,27 +1576,27 @@ def subplots(self, nrows=1, ncols=1, sharex=False, sharey=False,
15761576
# Returned axis array will be always 2-d, even if nrows=ncols=1.
15771577
return axarr
15781578

1579-
def build_grid(self, layout, subplot_kw=None, gridspec_kw=None):
1580-
"""
1581-
Builds a layout based on an grid of strings
1579+
def build_grid(self, layout, *, subplot_kw=None, gridspec_kw=None):
1580+
"""Build a layout based on an grid of strings.
15821581
1583-
This is a helper function to build complex GridSpec layouts visually
1582+
This is a helper function to build complex GridSpec layouts visually.
15841583
15851584
Parameters
15861585
----------
15871586
layout : list of list of str
1588-
A visual layout of how you want your Axes to be arranged labeled as strings.
1589-
For example ::
1587+
1588+
A visual layout of how you want your Axes to be arranged
1589+
labeled as strings. For example ::
15901590
15911591
x = [['A', 'A', 'B'],
15921592
['C', 'D', 'B']]
15931593
15941594
Produces 4 axes:
15951595
1596-
- 'A' which is 1 row high and spans the first two columns
1597-
- 'B' which is 2 rows high and is on the right edge
1598-
- 'C' which in 1 row and 1 column wide in the bottom left
1599-
- 'D' which in 1 row and 1 column wide in the bottom center
1596+
- 'A' which is 1 row high and spans the first two columns
1597+
- 'B' which is 2 rows high and is on the right edge
1598+
- 'C' which in 1 row and 1 column wide in the bottom left
1599+
- 'D' which in 1 row and 1 column wide in the bottom center
16001600
16011601
subplot_kw : dict, optional
16021602
Dict with keywords passed to the

0 commit comments

Comments
 (0)