Skip to content

Commit 08bfed7

Browse files
committed
Small doc cleanups.
1 parent 91016d8 commit 08bfed7

File tree

5 files changed

+24
-33
lines changed

5 files changed

+24
-33
lines changed

lib/matplotlib/backends/backend_pdf.py

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2640,11 +2640,8 @@ def savefig(self, figure=None, **kwargs):
26402640
26412641
Parameters
26422642
----------
2643-
figure : `.Figure` or int, optional
2644-
Specifies what figure is saved to file. If not specified, the
2645-
active figure is saved. If a `.Figure` instance is provided, this
2646-
figure is saved. If an int is specified, the figure instance to
2647-
save is looked up by number.
2643+
figure : `.Figure` or int, default: the active figure
2644+
The figure, or index of the figure, that is saved to the file.
26482645
"""
26492646
if not isinstance(figure, Figure):
26502647
if figure is None:

lib/matplotlib/backends/backend_pgf.py

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1019,11 +1019,8 @@ def savefig(self, figure=None, **kwargs):
10191019
10201020
Parameters
10211021
----------
1022-
figure : `.Figure` or int, optional
1023-
Specifies what figure is saved to file. If not specified, the
1024-
active figure is saved. If a `.Figure` instance is provided, this
1025-
figure is saved. If an int is specified, the figure instance to
1026-
save is looked up by number.
1022+
figure : `.Figure` or int, default: the active figure
1023+
The figure, or index of the figure, that is saved to the file.
10271024
"""
10281025
if not isinstance(figure, Figure):
10291026
if figure is None:

lib/matplotlib/gridspec.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -568,7 +568,7 @@ def get_topmost_subplotspec(self):
568568

569569
class SubplotSpec:
570570
"""
571-
Specifies the location of a subplot in a `GridSpec`.
571+
The location of a subplot in a `GridSpec`.
572572
573573
.. note::
574574

lib/matplotlib/markers.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -406,7 +406,7 @@ def _set_tuple_marker(self):
406406

407407
def _set_mathtext_path(self):
408408
"""
409-
Draws mathtext markers '$...$' using TextPath object.
409+
Draw mathtext markers '$...$' using TextPath object.
410410
411411
Submitted by tcb
412412
"""

tutorials/intermediate/gridspec.py

Lines changed: 18 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -5,27 +5,24 @@
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. See also
12-
`matplotlib.figure.Figure.subplots`.
13-
14-
:class:`~matplotlib.gridspec.GridSpec`
15-
Specifies the geometry of the grid that a subplot will be
16-
placed. The number of rows and number of columns of the grid
17-
need to be set. Optionally, the subplot layout parameters
18-
(e.g., left, right, etc.) can be tuned.
19-
20-
:class:`~matplotlib.gridspec.SubplotSpec`
21-
Specifies the location of the subplot in the given *GridSpec*.
22-
23-
:func:`~matplotlib.pyplot.subplot2grid`
24-
A helper function that is similar to
25-
:func:`~matplotlib.pyplot.subplot`,
26-
but uses 0-based indexing and let subplot to occupy multiple cells.
27-
This function is not covered in this tutorial.
28-
8+
`~matplotlib.pyplot.subplots`
9+
The primary function used to create figures and axes. It is similar to
10+
`.pyplot.subplot`, but creates and places all axes on the figure at once.
11+
See also `.Figure.subplots`.
12+
13+
`~matplotlib.gridspec.GridSpec`
14+
Specifies the geometry of the grid that a subplot will be
15+
placed. The number of rows and number of columns of the grid
16+
need to be set. Optionally, the subplot layout parameters
17+
(e.g., left, right, etc.) can be tuned.
18+
19+
`~matplotlib.gridspec.SubplotSpec`
20+
Specifies the location of the subplot in the given `.GridSpec`.
21+
22+
`~matplotlib.pyplot.subplot2grid`
23+
A helper function that is similar to `.pyplot.subplot`,
24+
but uses 0-based indexing and let subplot to occupy multiple cells.
25+
This function is not covered in this tutorial.
2926
"""
3027

3128
import matplotlib.pyplot as plt

0 commit comments

Comments
 (0)