Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit e2b2bbe

Browse files
committed
Refine can_composite
1 parent 9285c3a commit e2b2bbe

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

lib/matplotlib/image.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -510,7 +510,11 @@ def can_composite(self):
510510
"""
511511
Returns `True` if the image can be composited with its neighbors.
512512
"""
513-
return self._interpolation != 'none'
513+
trans = self.get_transform()
514+
return (
515+
self._interpolation != 'none' and
516+
trans.is_affine and
517+
trans.is_separable)
514518

515519
def set_resample(self, v):
516520
"""

0 commit comments

Comments
 (0)