Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
ksunden merged 3 commits intomatplotlib:mainfromjklymak:doc-shorten-animation
Jan 11, 2023
Merged

Conversation

jklymak
Copy link
Member

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 bemuch faster.

PR Checklist

Documentation and Tests

  • Has pytest style unit tests (andpytest passes)
  • Documentation is sphinx and numpydoc compliant (the docs shouldbuild without error).
  • New plotting related features are documented with examples.

Release Notes

  • New features are marked with a.. versionadded:: directive in the docstring and documented indoc/users/next_whats_new/
  • API changes are marked with a.. versionchanged:: directive in the docstring and documented indoc/api/next_api_changes/
  • Release notes conform with instructions innext_whats_new/README.rst ornext_api_changes/README.rst

@tacaswelltacaswell added this to thev3.7.0 milestoneJan 9, 2023
Copy link
Member

@timhoffmtimhoffm left a 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.

story645 reacted with thumbs up emoji
@jklymak
Copy link
MemberAuthor

OK, changed this much more to something physical if trivial. Also did things like label the axes etc...

@jklymakjklymakforce-pushed thedoc-shorten-animation branch 2 times, most recently from449a57c toa489512CompareJanuary 10, 2023 01:06
Comment on lines -104 to -107
# .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.
Copy link
Contributor

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?

story645 reacted with thumbs up emoji
Copy link
MemberAuthor

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.

@chahak13
Copy link
Contributor

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 :)

@ksundenksunden merged commit66dd732 intomatplotlib:mainJan 11, 2023
meeseeksmachine pushed a commit to meeseeksmachine/matplotlib that referenced this pull requestJan 11, 2023
@jklymak
Copy link
MemberAuthor

Thanks@ksunden

I think this was important to get in to keep the doc build reasonable. OTOH,@chahak13 or@story645 you are more than welcome to open a new PR to tweak the wording.

story645 and chahak13 reacted with thumbs up emoji

@jklymakjklymak deleted the doc-shorten-animation branchJanuary 11, 2023 21:15
QuLogic added a commit that referenced this pull requestJan 12, 2023
…918-on-v3.7.xBackport PR#24918 on branch v3.7.x (DOC: animation faster)
@ksundenksunden mentioned this pull requestFeb 20, 2023
6 tasks
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@timhoffmtimhoffmtimhoffm left review comments

@chahak13chahak13chahak13 left review comments

@tacaswelltacaswelltacaswell approved these changes

@ksundenksundenksunden approved these changes

Assignees
No one assigned
Projects
None yet
Milestone
v3.7.0
Development

Successfully merging this pull request may close these issues.

5 participants
@jklymak@chahak13@tacaswell@ksunden@timhoffm

[8]ページ先頭

©2009-2025 Movatter.jp