8000 MNT: Simplify logic about when to force animated · matplotlib/matplotlib@e7393d9 · GitHub
[go: up one dir, main page]

Skip to content

Commit e7393d9

Browse files
committed
MNT: Simplify logic about when to force animated
Only attempt to force `set_animated(True)` when blitting is enabled.
1 parent cd0fe36 commit e7393d9

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/matplotlib/animation.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1160,7 +1160,7 @@ def _init_draw(self):
11601160
self._draw_frame(next(self.new_frame_seq()))
11611161
else:
11621162
self._drawn_artists = self._init_func()
1163-
if iterable(self._drawn_artists):
1163+
if self._blit:
11641164
for a in self._drawn_artists:
11651165
a.set_animated(self._blit)
11661166

@@ -1175,6 +1175,6 @@ def _draw_frame(self, framedata):
11751175
# Call the func with framedata and args. If blitting is desired,
11761176
# func needs to return a sequence of any artists that were modified.
11771177
self._drawn_artists = self._func(framedata, *self._args)
1178-
if iterable(self._drawn_artists):
1178+
if self._blit:
11791179
for a in self._drawn_artists:
11801180
a.set_animated(self._blit)

0 commit comments

Comments
 (0)
0