-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
DOC: animation faster #24918
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
DOC: animation faster #24918
Conversation
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.
Reducing the number of points is reasonable. However, with that, you only plot in a tiny fraction of the Axes, and the (somewhat complex) x-y relation does not become apparent.
I suggest to change the data as well, e.g. plot 36 points on a unit circle.
OK, changed this much more to something physical if trivial. Also did things like label the axes etc... |
449a57c
to
a489512
Compare
# .set_offsets replaces the offset data for the entire collection with | ||
# the new values. Therefore, to also carry forward the previously | ||
# calculated information, we use the data from the first to the current | ||
# frame to set the new offsets. |
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 feel like an explanation about why we take the entire data for the new frame should be there since this is a tutorial. Maybe reword it a little but not remove it completely?
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 changed it a bit. Note I also added comments for the steps where the data was added, which basically says what you are saying in the old text, so I think it's relatively clear? If not, happy to take suggestions.
The original idea was to not have something entirely trivial to show how to go about doing slightly more problem based, which is why I did not go for, say a unit circle. I'm happy with the projectile motion example that you added if it's making the doc load much faster :) |
a5535a6
to
c14227b
Compare
…918-on-v3.7.x Backport PR #24918 on branch v3.7.x (DOC: animation faster)
PR Summary
The new animation tutorial takes over 30s to render in sphinx gallery on my machine. That seems unnecessary for didactic purposes. This version takes less than 5 s. Maybe someone wants different aesthetics, but this really is pretty slow.
@chahak13 I think you wrote the original. happy to defer to your interest in how this looks, but I still strongly encourage that it be much faster.
PR Checklist
Documentation and Tests
pytest
passes)Release Notes
.. versionadded::
directive in the docstring and documented indoc/users/next_whats_new/
.. versionchanged::
directive in the docstring and documented indoc/api/next_api_changes/
next_whats_new/README.rst
ornext_api_changes/README.rst