Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes to funcanimation #4800

Merged
merged 4 commits into from Jul 31, 2015
Merged

Conversation

jenshnielsen
Copy link
Member

While reviewing #4785 I discovered a few issues with the decay animation example:

  1. The example does not reset the plotted data when the animation is rerun/resaved after having been running/saved once. To solve this I added an init function to resets the animation.
  2. The init function is only called at construction time and not when restarting the animation so the above doesn't work. I adapted the code to make sure that init is called at both the beginning of a save sequence and when showing the animation.
  3. When saving the figure more than once or showing and saving the animation the second version of the animation contains wrong frames (the first frame at the end or missing frames in the beginning an so on) This is caused by the animation iterating over _save_seq and updating _save_seq while iterating. I have fixed this by copying _save_seq before iterating.

@dopplershift does this make sense or do you see a better way of fixing these issues?

@dopplershift
Copy link
Contributor

Looks good to me. Just waiting on Travis to confirm all good.

@tacaswell tacaswell added this to the next point release milestone Jul 28, 2015
tacaswell added a commit that referenced this pull request Jul 31, 2015
@tacaswell tacaswell merged commit 5c58ea9 into matplotlib:master Jul 31, 2015
dopplershift added a commit to dopplershift/matplotlib that referenced this pull request Aug 4, 2015
This was introduced by matplotlib#4800. We need to disconnect the initial draw
callback in _start() before doing _init_draw(), otherwise, we end up
back in _start() when the draw_event fires.

Also go ahead and remove the call to _init_draw() in __init__(), since
_start() will handle it.
@jenshnielsen jenshnielsen deleted the funcanimfixes branch August 20, 2015 12:42
tacaswell pushed a commit to tacaswell/matplotlib that referenced this pull request Aug 27, 2015
This was introduced by matplotlib#4800. We need to disconnect the initial draw
callback in _start() before doing _init_draw(), otherwise, we end up
back in _start() when the draw_event fires.

Also go ahead and remove the call to _init_draw() in __init__(), since
_start() will handle it.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants