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

Skip to content

Commit ba1b509

Browse files
committed
DOC: fix whitespace in gridspec tutorial
1 parent 1352c5c commit ba1b509

File tree

1 file changed

+8
-7
lines changed

1 file changed

+8
-7
lines changed

tutorials/intermediate/gridspec.py

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,11 @@
55
66
How to create grid-shaped combinations of axes.
77
8+
:func:`~matplotlib.pyplot.subplots`
9+
Perhaps the primary function used to create figures and axes.
10+
It's also similar to :func:`~matplotlib.pyplot.subplot`,
11+
but creates and places all axes on the figure at once.
12+
813
:class:`~matplotlib.gridspec.GridSpec`
914
Specifies the geometry of the grid that a subplot will be
1015
placed. The number of rows and number of columns of the grid
@@ -17,11 +22,7 @@
1722
:func:`~matplotlib.pyplot.subplot2grid`
1823
A helper function that is similar to :func:`~matplotlib.pyplot.subplot`,
1924
but uses 0-based indexing and let subplot to occupy multiple cells.
20-
21-
:func:`~matplotlib.pyplot.subplots`
22-
perhaps the primary function used to create figures and axes.
23-
It's also similar to :func:`~matplotlib.pyplot.subplot`,
24-
but creates and places all axes on the figure at once.
25+
This function is not covered in this tutorial.
2526
2627
"""
2728

@@ -88,7 +89,7 @@
8889
# matter.
8990
# That means that ``width_ratios=[2, 4, 8]`` is equivalent to
9091
# ``width_ratios=[1, 2, 4]`` within equally wide figures.
91-
# For the sake of demonstration, we'll blindly create the axes within
92+
# For the sake of demonstration, we'll blindly create the axes within
9293
# ``for`` loops since we won't need them later.
9394

9495
fig4 = plt.figure()
@@ -107,7 +108,7 @@
107108
############################################################################
108109
# Learning to use ``width_ratios`` and ``height_ratios`` is particularly
109110
# useful since the top-level function :func:`~matplotlib.pyplot.subplots`
110-
# accepts them within the ``gridspec_kw`` parameter.
111+
# accepts them within the ``gridspec_kw`` parameter.
111112
# For that matter, any parameter accepted by
112113
# :class:`~matplotlib.gridspec.GridSpec` can be passed to
113114
# :func:`~matplotlib.pyplot.subplots` via the ``gridspec_kw`` parameter.

0 commit comments

Comments
 (0)