From 51f09dd7895e7b37b2661c7e04bb7892203be527 Mon Sep 17 00:00:00 2001 From: Ryan May Date: Wed, 7 Sep 2016 11:21:15 -0600 Subject: [PATCH 1/2] BUG: Use get_figure() rather than attribute. (Fixes #6965) This allows artists without a .axes attribute to work in animations. --- lib/matplotlib/animation.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/matplotlib/animation.py b/lib/matplotlib/animation.py index d769da77d7b..7a30fa1aa36 100644 --- a/lib/matplotlib/animation.py +++ b/lib/matplotlib/animation.py @@ -1205,8 +1205,8 @@ def _init_draw(self): artist.set_visible(False) artist.set_animated(self._blit) # Assemble a list of unique figures that need flushing - if artist.axes.figure not in figs: - figs.add(artist.axes.figure) + if artist.get_figure() not in figs: + figs.add(artist.get_figure()) # Flush the needed figures for fig in figs: From 6962dee27c38c2ced79a2305edacf198894ee8b2 Mon Sep 17 00:00:00 2001 From: Ryan May Date: Wed, 7 Sep 2016 11:24:44 -0600 Subject: [PATCH 2/2] BUG: Fix error in ArtistAnimation docstring (Fixes #6964) The parameter is artists, not frame_info. --- lib/matplotlib/animation.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/matplotlib/animation.py b/lib/matplotlib/animation.py index 7a30fa1aa36..b26ce78af21 100644 --- a/lib/matplotlib/animation.py +++ b/lib/matplotlib/animation.py @@ -1184,7 +1184,7 @@ class ArtistAnimation(TimedAnimation): Before calling this function, all plotting should have taken place and the relevant artists saved. - frame_info is a list, with each list entry a collection of artists that + *artists* is a list, with each list entry a collection of artists that represent what needs to be enabled on each frame. These will be disabled for other frames. '''