Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork7.9k
Description
Problem
It's tricky to learn that you should useset_data
when animating. When i first got into this I was essentially doing:
fortinrange(timepoints):ax.imshow(data[t])
which is bad news for performance. I fortunately had someone around to tell me to useset_data
but lacking that I think it would have taken me a lot longer to figure out.
However, even after figuring that out it's not all smooth sailing. I was tripped up for quite awhile on how to animate a scatter plot as it usesset_offsets
instead ofset_data
. There can also be other complications see for example#18401.
Suggested Improvement
Include a reference style example in the animation section of the gallery that goes over how to animate all the possible animatable artists (set_data
,set_offsets
, etc...). Or at least all of the artists that get returned from pyplot functions. Ideally the example would use the artists created from pyplot(or equivalentax
) functions as this is how I imagine most people will create the artists for their animations.
For reference I brought this up on gitter, but gitter just crashed :(
Matplotlib version
- Matplotlib documentation version: any