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

Skip to content

Commit 25b736a

Browse files
pharshalptacaswell
authored andcommitted
add documentation for quality in savefig (#11529)
* add documentation for quality in savefig based on the discussion here #458 and also using some of the lines from https://matplotlib.org/api/backend_agg_api.html?highlight=print_jpeg#matplotlib.backends.backend_agg.FigureCanvasAgg.print_jpeg
1 parent d896d6d commit 25b736a

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

lib/matplotlib/figure.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1812,6 +1812,13 @@ def savefig(self, fname, *, frameon=None, transparent=None, **kwargs):
18121812
The resolution in dots per inch. If *None*, defaults to
18131813
:rc:`savefig.dpi`. If 'figure', uses the figure's dpi value.
18141814
1815+
quality : [ *None* | 1 <= scalar <= 100 ]
1816+
The image quality, on a scale from 1 (worst) to 95 (best).
1817+
Applicable only if *format* is jpg or jpeg, ignored otherwise.
1818+
If *None*, defaults to :rc:`savefig.jpeg_quality` (95 by default).
1819+
Values above 95 should be avoided; 100 completely disables the
1820+
JPEG quantization stage.
1821+
18151822
facecolor : color spec or None, optional
18161823
The facecolor of the figure; if *None*, defaults to
18171824
:rc:`savefig.facecolor`.

0 commit comments

Comments
 (0)