From 6fa1c178e1ec26062812db8e71c18458fe30897c 2016-03-06 01:30:35 From: Thomas A Caswell Date: 2016-03-06 01:30:35 Subject: [PATCH] FIX: account for dpi == 'figure' In mpl 1.5.0 'figure' became a valid dpi value, in 2.0 it will become the default. xref https://github.com/matplotlib/matplotlib/issues/6113 --- diff --git a/IPython/core/pylabtools.py b/IPython/core/pylabtools.py index 6528178..f865199 100644 --- a/IPython/core/pylabtools.py +++ b/IPython/core/pylabtools.py @@ -98,6 +98,8 @@ def print_figure(fig, fmt='png', bbox_inches='tight', **kwargs): return dpi = rcParams['savefig.dpi'] + if dpi == 'figure': + dpi = fig.dpi if fmt == 'retina': dpi = dpi * 2 fmt = 'png'