|
5 | 5 |
|
6 | 6 | How to create grid-shaped combinations of axes. |
7 | 7 |
|
| 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 | +
|
8 | 13 | :class:`~matplotlib.gridspec.GridSpec` |
9 | 14 | Specifies the geometry of the grid that a subplot will be |
10 | 15 | placed. The number of rows and number of columns of the grid |
|
17 | 22 | :func:`~matplotlib.pyplot.subplot2grid` |
18 | 23 | A helper function that is similar to :func:`~matplotlib.pyplot.subplot`, |
19 | 24 | 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. |
25 | 26 |
|
26 | 27 | """ |
27 | 28 |
|
|
88 | 89 | # matter. |
89 | 90 | # That means that ``width_ratios=[2, 4, 8]`` is equivalent to |
90 | 91 | # ``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 |
92 | 93 | # ``for`` loops since we won't need them later. |
93 | 94 |
|
94 | 95 | fig4 = plt.figure() |
|
107 | 108 | ############################################################################ |
108 | 109 | # Learning to use ``width_ratios`` and ``height_ratios`` is particularly |
109 | 110 | # 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. |
111 | 112 | # For that matter, any parameter accepted by |
112 | 113 | # :class:`~matplotlib.gridspec.GridSpec` can be passed to |
113 | 114 | # :func:`~matplotlib.pyplot.subplots` via the ``gridspec_kw`` parameter. |
|
0 commit comments