8000 Merge pull request #16276 from anntzer/savefigdoc · matplotlib/matplotlib@2108af1 · GitHub
[go: up one dir, main page]

Skip to content

Commit 2108af1

Browse files
authored
Merge pull request #16276 from anntzer/savefigdoc
Cleanup docstring of print_figure, savefig.
2 parents e3e7792 + 99eb7a4 commit 2108af1

File tree

2 files changed

+11
-14
lines changed

2 files changed

+11
-14
lines changed

lib/matplotlib/backend_bases.py

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1974,11 +1974,8 @@ def print_figure(self, filename, dpi=None, facecolor=None, edgecolor=None,
19741974
19751975
Parameters
19761976
----------
1977-
filename
1978-
can also be a file object on image backends
1979-
1980-
orientation : {'landscape', 'portrait'}, default: 'portrait'
1981-
only currently applies to PostScript printing.
1977+
filename : str or path-like or file-like
1978+
The file where the figure is saved.
19821979
19831980
dpi : float, default: :rc:`savefig.dpi`
19841981
The dots per inch to save the figure in.
@@ -1989,16 +1986,17 @@ def print_figure(self, filename, dpi=None, facecolor=None, edgecolor=None,
19891986
edgecolor : color, default: :rc:`savefig.edgecolor`
19901987
The edgecolor of the figure.
19911988
1989+
orientation : {'landscape', 'portrait'}, default: 'portrait'
1990+
Only currently applies to PostScript printing.
1991+
19921992
format : str, optional
19931993
Force a specific file format. If not given, the format is inferred
19941994
from the *filename* extension, and if that fails from
19951995
:rc:`savefig.format`.
19961996
1997-
bbox_inches : 'tight' or `~matplotlib.transforms.Bbox`, \
1998-
default: :rc:`savefig.bbox`
1999-
Bbox in inches. Only the given portion of the figure is
2000-
saved. If 'tight', try to figure out the tight bbox of
2001-
the figure.
1997+
bbox_inches : 'tight' or `.Bbox`, default: :rc:`savefig.bbox`
1998+
Bounding box in inches: only the given portion of the figure is
1999+
saved. If 'tight', try to figure out the tight bbox of the figure.
20022000
20032001
pad_inches : float, default: :rc:`savefig.pad_inches`
20042002
Amount of padding around the figure when *bbox_inches* is 'tight'.

lib/matplotlib/figure.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2113,10 +2113,9 @@ def savefig(self, fname, *, transparent=None, **kwargs):
21132113
transparency of these patches will be restored to their
21142114
original values upon exit of this function.
21152115
2116-
bbox_inches : str or `~matplotlib.transforms.Bbox`, optional
2117-
Bbox in inches. Only the given portion of the figure is
2118-
saved. If 'tight', try to figure out the tight bbox of
2119-
the figure. If None, use savefig.bbox
2116+
bbox_inches : str or `.Bbox`, default: :rc:`savefig.bbox`
2117+
Bounding box in inches: only the given portion of the figure is
2118+
saved. If 'tight', try to figure out the tight bbox of the figure.
21202119
21212120
pad_inches : scalar, optional
21222121
Amount of padding around the figure when bbox_inches is

0 commit comments

Comments
 (0)
0