-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
Animation example: rain drops #3050
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
Conversation
import matplotlib | ||
import numpy as np | ||
matplotlib.use('TkAgg') | ||
matplotlib.rcParams['toolbar'] = 'None' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's keep this example as simple as possible. So let's get rid of some of these lines (we will also need to get rid of "blit=True" in order for animations to work for macosx backend, I think.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I removed extra lines but keep the TkAgg and blit=True or it does not work on OSX.
Sorry, this isn't a constructive comment, but... This is really cool! |
Thanks. |
This is really great. I've updated the code to be a little more explicit in b79cd64 which I think might be worth pulling into this PR. |
I also did a mouse-based demo but finally found the simple rain more peaceful and mesmerizing... |
Agreed. If you're happy to do so, please consider incorporating my stylistic changes, and I'll be happy to merge this. Great example, thanks @rougier. |
Stupid question: what would be the magic git command to merge your changes in my PR ? |
Rain anim
Merged, but Travis failed. |
wonderful, the font priority issue has migrated to 3.3 as well. Those failures are known and can be ignored. |
@pelson Do you want to do the honors? |
This is an example for the animation function displaying rain drops (kind of).
The animation is made using a scatter plot. Each drop is shown as a growing and fading disc.
In the example, there are 50 simultaneous rain drops anytime.
The use of the TkAgg backend is necessary on OSX.
It is meant to replace PR #3048 to avoid basemap dependency.