Skip to content

Commit f61358a

Browse files
authored
Merge pull request #11829 from fredrik-1/func_animation_warning
func animation warning changes
2 parents b1df283 + b693532 commit f61358a

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

lib/matplotlib/animation.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1725,11 +1725,13 @@ def _draw_frame(self, framedata):
17251725

17261726
# Call the func with framedata and args. If blitting is desired,
17271727
# func needs to return a sequence of any artists that were modified.
1728-
self._drawn_artists = sorted(self._func(framedata, *self._args),
1729-
key=lambda x: x.get_zorder())
1728+
self._drawn_artists = self._func(framedata, *self._args)
17301729
if self._blit:
17311730
if self._drawn_artists is None:
17321731
raise RuntimeError('The animation function must return a '
17331732
'sequence of Artist objects.')
1733+
self._drawn_artists = sorted(self._drawn_artists,
1734+
key=lambda x: x.get_zorder())
1735+
17341736
for a in self._drawn_artists:
17351737
a.set_animated(self._blit)

0 commit comments

Comments
 (0)