@@ -275,7 +275,14 @@ def set_matplotlib_formats(*formats, **kwargs):
275275
276276 For example, this enables PNG and JPEG output with a JPEG quality of 90%::
277277
278- In [1]: set_matplotlib_formats('png', 'jpeg', quality=90)
278+ In [1]: set_matplotlib_formats('png', 'jpeg',
279+ pil_kwargs={'quality': 90})
280+
281+ To set this in your notebook by `%config` magic::
282+
283+ In [1]: %config InlineBackend.figure_formats = {'png', 'jpeg'}
284+ %config InlineBackend.print_figure_kwargs = \\
285+ {'pil_kwargs': {'quality' : 90}}
279286
280287 To set this in your config files use the following::
281288
@@ -288,6 +295,10 @@ def set_matplotlib_formats(*formats, **kwargs):
288295 One or more figure formats to enable: 'png', 'retina', 'jpeg', 'svg', 'pdf'.
289296 **kwargs
290297 Keyword args will be relayed to ``figure.canvas.print_figure``.
298+
299+ In addition, see the docstrings of `plt.savefig()`,
300+ `matplotlib.figure.Figure.savefig()`, `PIL.Image.Image.save()` and
301+ https://pillow.readthedocs.io/en/stable/handbook/image-file-formats.html
291302 """
292303 # build kwargs, starting with InlineBackend config
293304 cfg = InlineBackend .instance ()
0 commit comments