Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork7.9k
DOC: Use Sphinx-gallery animation capture#17477
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
... and adds a |
I'm very very psyched, but why are some of the examples not showing? Is there something that can be done on matplotlib's side to get that working? |
During build I see:
I'll bump this up in https://37238-1385122-gh.circle-artifacts.com/0/doc/build/html/gallery/index.html#animation
I'll take a quick pass at making the ones that do use FuncAnimation build a bit more nicely. |
How are you identifying the animation object to capture? We want to leave at least some of the " |
Global variable inspection
Indeed, not planning to change that one. But the |
I would go with |
Done insphinx-gallery/sphinx-gallery#693 , will have to wait for 0.7.1 to land before it takes effect, though. In the meantime I've added The CircleCI build should produce the same thing, except that the |
CircleCI output can be viewed here. Now the animation timings are:
And the non-animation ones in roughly the same range for reference:
So there is something like a 2-3 minute time penalty from rendering these animations now. If this is too much time, I can work on trimming them. Ready for merge from my end otherwise! |
examples/animation/strip_chart.py Outdated
@@ -49,14 +49,14 @@ def emitter(p=0.03): | |||
yield np.random.rand(1) | |||
# Fixing random state for reproducibility | |||
np.random.seed(19680801) | |||
np.random.seed(1968080) |
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.
np.random.seed(1968080) | |
np.random.seed(19680801) |
One of the sentimental things we do is seed the random numbers to John Hunter's birthday. Would rather not change this unless there is a compelling reason.
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.
This was intentional -- the original seed did not yield many spikes for the given probability (and increasing the probability further made too many spikes) over the first few seconds of the animation
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.
How about I write it as19680801 // 10
? Same effect but preserves the birthday in there?
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.
(Or I could test if 0 or41 EDIT: 42 or 1337 or some other "principled" choice of seed gives something that plays well in the animation)
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.
19680801 // 10
<- if that looks good 👍
Could also "prime" the stream a bit by generating and discarding a bunch of numbers?
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.
Pushed the // 10
let's see if CircleCI produces something reasonable -- it should!
Uh oh!
There was an error while loading.Please reload this page.
Co-authored-by: Elliott Sales de Andrade <quantum.analyst@gmail.com>
|
Uh oh!
There was an error while loading.Please reload this page.
PR Summary
double_pendulum_sgskip
to actually buildIt does move some animations into the slowest category (local build times with this PR):
It might be possible to optimize these examples to be faster (I haven't looked/tried). Or maybe it's acceptable already...
PR Checklist
Looks like this on my machine
Let's see if CircleCI agrees!
Happy to iterate here if people agree it's worth having, let someone else take over if they want, or scrap it if it's not worth adding.