FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Fix #3057: Don't composite when interpolation == 'none' · matplotlib/matplotlib@6e60ebf · GitHub

Repository navigation

Commit 6e60ebf

Browse files
committed
Fix #3057: Don't composite when interpolation == 'none'
1 parent 7b32cd8 commit 6e60ebf

2 files changed

Lines changed: 4 additions & 2 deletions

File tree

‎lib/matplotlib/axes/_base.py‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2325,7 +2325,9 @@ def draw(self, renderer=None, inframe=False):
23252325

23262326
# add images to dsu if the backend supports compositing.
23272327
# otherwise, does the manual compositing without adding images to dsu.
2328-
if len(self.images) <= 1 or renderer.option_image_nocomposite():
2328+
if (len(self.images) <= 1 or
2329+
renderer.option_image_nocomposite() or
2330+
any(im.get_interpolation() == 'none' for im in self.images)):
23292331
_do_composite = False
23302332
else:
23312333
_do_composite = True

‎lib/matplotlib/figure.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1248,7 +1248,7 @@ def draw(self, renderer):
12481248
not_composite = self.suppressComposite
12491249

12501250
if (len(self.images) <= 1 or not_composite or
1251-
not cbook.allequal([im.origin for im in self.images])):
1251+
any(im.get_interpolation() == 'none' for im in self.images)):
12521252
for a in self.images:
12531253
dsu.append((a.get_zorder(), a, a.draw, [renderer]))
12541254
else:

0 commit comments

Comments
 (0)

Back | FazBrowse Home | New Git URL