Skip to content

Commit

Permalink
Merge pull request #4439 from tswsl1989/restrict_dict_gdk
Browse files Browse the repository at this point in the history
FIX : Import cbook.restrict_dict into backend_gdk
  • Loading branch information
tacaswell committed May 18, 2015
1 parent ec6c107 commit 2e445c2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/matplotlib/backends/backend_gdk.py
Expand Up @@ -26,7 +26,7 @@ def fn_name(): return sys._getframe(1).f_code.co_name
from matplotlib._pylab_helpers import Gcf
from matplotlib.backend_bases import RendererBase, GraphicsContextBase, \
FigureManagerBase, FigureCanvasBase
from matplotlib.cbook import is_string_like
from matplotlib.cbook import is_string_like, restrict_dict
from matplotlib.figure import Figure
from matplotlib.mathtext import MathTextParser
from matplotlib.transforms import Affine2D
Expand Down Expand Up @@ -477,7 +477,7 @@ def _print_image(self, filename, format, *args, **kwargs):

# set the default quality, if we are writing a JPEG.
# http://www.pygtk.org/docs/pygtk/class-gdkpixbuf.html#method-gdkpixbuf--save
options = cbook.restrict_dict(kwargs, ['quality'])
options = restrict_dict(kwargs, ['quality'])
if format in ['jpg','jpeg']:
if 'quality' not in options:
options['quality'] = rcParams['savefig.jpeg_quality']
Expand Down

0 comments on commit 2e445c2

Please sign in to comment.