File tree Expand file tree Collapse file tree 1 file changed +6
-9
lines changed Expand file tree Collapse file tree 1 file changed +6
-9
lines changed Original file line number Diff line number Diff line change @@ -1844,16 +1844,13 @@ def _get_animated_artists(self):
1844
1844
Convenience method to get all animated artists of a figure, except
1845
1845
those already present in self.artists.
1846
1846
"""
1847
- axes = self .ax .get_figure ().get_axes ()
1848
- animated_artists = tuple ()
1849
- for ax in axes :
1847
+ animated_artists = []
1848
+ for ax in self .ax .get_figure ().get_axes ():
1850
1849
# Make sure we don't get the artists already in self.artists
1851
- artists = filter (
1852
- lambda a : a .get_animated () and a not in self .artists ,
1853
- ax .get_children ()
1854
- )
1855
- animated_artists += tuple (sorted (artists , key = lambda a : a .zorder ))
1856
- return animated_artists
1850
+ l = [a for a in ax .get_children ()
1851
+ if (a .get_animated () and a not in self .artists )]
1852
+ animated_artists .extend (sorted (l , key = lambda a : a .zorder ))
1853
+ return tuple (animated_artists )
1857
1854
1858
1855
def update_background (self , event ):
1859
1856
"""Force an update of the background."""
You can’t perform that action at this time.
0 commit comments