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
New animation example (Joy Division's Unchained Love cover) #3099
Conversation
@efiring Does this count as a new feature? |
@tacaswell, if you are asking about the "feature freeze" aspect, it's borderline, but I would say a new example is harmless and can be included. For an animation, it would be best if it could be tested on a variety of gui backends and platforms prior to release. |
Neat! I like it. |
import matplotlib.animation as animation | ||
|
||
# Create new Figure with black background | ||
fig = plt.figure(figsize=(8,8)) |
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.
Part of the code isn't pep8. Can you run pep8 on it, and fix the errors?
(Here, there should be a space after the coma)
Can you also squash this down to one commit? |
Sure (but I do not know the git magic command, will search). |
|
and then a |
Ok, it's a total mess, maybe the easiest at this point it to create a new PR, no ? |
nah, it's savable (PRs on github point at branches so with force push you can save it). git checkout unchained # make sure you are on the right branch follow directions: put 's' before all of the commits but the first one, this should go smoothly git push github # this will not work, but you should read the error message |
Just did that before reading your message. Thanks. Sorry for the trouble. |
|
||
# Update data | ||
for i in range(len(data)): | ||
lines[i].set_ydata(i + G * data[i]) |
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.
sorry, one last thing, update should return the artists changed. This is mostly to make blitting work.
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.
Which one (there are 256 of them) ?
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.
The list of all of them (lines
).
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.
done.
New animation example (Joy Division's Unchained Love cover)
This demo is fantastic! ... the only problem is the name. I am not sure where "Unchained Love" comes from: the famous Joy Division album with the line art showing data from pulsar B1919+21 is called "Unknown Pleasures" |
Thanks for the information. I don't remember where I get this name from actually. |
Yes, it's real data. There have been several articles about the origins of this plot. For example: |
Fantastic ! Didn't know. |
This is a (cool IMHO) plot animation inspired from the Joy Division Unchained Love cover.
It shows how to animate plots and how to simulate a cheap perspective effect.
I did it after answering this question on stack overflow.
http://stackoverflow.com/questions/23507217/python-plotting-2d-data-on-to-3d-axes/23968448#23968448
Nicolas