Skip to content

Commit

Permalink
Fix matplotlib#3057: Don't composite when interpolation == 'none'
Browse files Browse the repository at this point in the history
  • Loading branch information
mdboom committed Jan 28, 2016
1 parent e7834af commit fe3a171
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion lib/matplotlib/axes/_base.py
Expand Up @@ -2319,7 +2319,9 @@ def draw(self, renderer=None, inframe=False):

# add images to dsu if the backend supports compositing.
# otherwise, does the manual compositing without adding images to dsu.
if len(self.images) <= 1 or renderer.option_image_nocomposite():
if (len(self.images) <= 1 or
renderer.option_image_nocomposite() or
any(im.get_interpolation() == 'none' for im in self.images)):
_do_composite = False
else:
_do_composite = True
Expand Down
2 changes: 1 addition & 1 deletion lib/matplotlib/figure.py
Expand Up @@ -1248,7 +1248,7 @@ def draw(self, renderer):
not_composite = self.suppressComposite

if (len(self.images) <= 1 or not_composite or
not cbook.allequal([im.origin for im in self.images])):
any(im.get_interpolation() == 'none' for im in self.images)):
for a in self.images:
dsu.append((a.get_zorder(), a, a.draw, [renderer]))
else:
Expand Down

0 comments on commit fe3a171

Please sign in to comment.