Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[DOC] Minor fixes for savefig-docstring #27323

Merged
merged 1 commit into from
Nov 14, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
40 changes: 20 additions & 20 deletions lib/matplotlib/figure.py
Original file line number Diff line number Diff line change
Expand Up @@ -3186,10 +3186,10 @@ def savefig(self, fname, *, transparent=None, **kwargs):

Call signature::

savefig(fname, *, dpi='figure', format=None, metadata=None,
bbox_inches=None, pad_inches=0.1,
facecolor='auto', edgecolor='auto',
backend=None, **kwargs
savefig(fname, *, transparent=None, dpi='figure', format=None,
metadata=None, bbox_inches=None, pad_inches=0.1,
facecolor='auto', edgecolor='auto', backend=None,
**kwargs
)

The available output formats depend on the backend being used.
Expand All @@ -3214,6 +3214,22 @@ def savefig(self, fname, *, transparent=None, **kwargs):

Other Parameters
----------------
transparent : bool, default: :rc:`savefig.transparent`
If *True*, the Axes patches will all be transparent; the
Figure patch will also be transparent unless *facecolor*
and/or *edgecolor* are specified via kwargs.

If *False* has no effect and the color of the Axes and
Figure patches are unchanged (unless the Figure patch
is specified via the *facecolor* and/or *edgecolor* keyword
arguments in which case those colors are used).

The transparency of these patches will be restored to their
original values upon exit of this function.

This is useful, for example, for displaying
a plot on top of a colored background on a web page.

dpi : float or 'figure', default: :rc:`savefig.dpi`
The resolution in dots per inch. If 'figure', use the figure's
dpi value.
Expand Down Expand Up @@ -3273,22 +3289,6 @@ def savefig(self, fname, *, transparent=None, **kwargs):
'a10', 'b0' through 'b10'. Only supported for postscript
output.

transparent : bool
If *True*, the Axes patches will all be transparent; the
Figure patch will also be transparent unless *facecolor*
and/or *edgecolor* are specified via kwargs.

If *False* has no effect and the color of the Axes and
Figure patches are unchanged (unless the Figure patch
is specified via the *facecolor* and/or *edgecolor* keyword
arguments in which case those colors are used).

The transparency of these patches will be restored to their
original values upon exit of this function.

This is useful, for example, for displaying
a plot on top of a colored background on a web page.

bbox_extra_artists : list of `~matplotlib.artist.Artist`, optional
A list of extra artists that will be considered when the
tight bbox is calculated.
Expand Down