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

Skip to content

Commit 0469ab7

Browse files
committed
Fix has image test in Axes
1 parent e52c26f commit 0469ab7

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

lib/matplotlib/axes/_base.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2352,7 +2352,9 @@ def draw(self, renderer=None, inframe=False):
23522352
a.draw(renderer)
23532353
renderer.stop_rasterizing()
23542354

2355-
if renderer.option_image_nocomposite() or len(self.images) == 0:
2355+
has_images = np.any(isinstance(x[1], mimage._ImageBase) for x in dsu)
2356+
2357+
if renderer.option_image_nocomposite() or not has_images:
23562358
for zorder, a in dsu:
23572359
a.draw(renderer)
23582360
else:

0 commit comments

Comments
 (0)