Skip to content

Commit 56e9b41

Browse files
committed
Don't composite images that are no clipped.
Otherwise, they may end up clipped accidentally.
1 parent df67aaf commit 56e9b41

File tree

3 files changed

+21
-25
lines changed

3 files changed

+21
-25
lines changed

lib/matplotlib/image.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,8 @@ def flush_images():
149149
del image_group[:]
150150

151151
for a in artists:
152-
if isinstance(a, _ImageBase) and a.can_composite():
152+
if (isinstance(a, _ImageBase) and a.can_composite() and
153+
a.get_clip_on()):
153154
image_group.append(a)
154155
else:
155156
flush_images()
Binary file not shown.

lib/matplotlib/tests/baseline_images/test_image/bbox_image_inverted.svg

Lines changed: 19 additions & 24 deletions
Loading

0 commit comments

Comments
 (0)