Skip to content

DOC: Fix resizing of animation examples #27006

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

Merged
merged 1 commit into from
Oct 6, 2023

Conversation

QuLogic
Copy link
Member

@QuLogic QuLogic commented Oct 5, 2023

PR summary

On resize, either init_func will be called, or if not defined, the main func with i=0 is called. On animations that save a state, the latter can cause weird glitching as the history will skip around.

  • For bayes_update, I fixed it by providing an init_func.
  • For double_pendulum, I fixed it by simplifying the trace line (since we have the entire history pre-computed.)

PR checklist

@QuLogic QuLogic added the Documentation: examples files in galleries/examples label Oct 5, 2023
@QuLogic
Copy link
Member Author

QuLogic commented Oct 5, 2023

For example, this will cause the double pendulum history to skip points like:
image

On resize, either `init_func` will be called, or if not defined, the
main `func` with `i=0` is called. On animations that save a state, the
latter can cause weird glitching as the history will skip around.

* For `bayes_update`, I fixed it by providing an `init_func`.
* For `double_pendulum`, I fixed it by simplifying the trace line (since
  we have the entire history pre-computed.)
@story645 story645 added this to the v3.8-doc milestone Oct 5, 2023
@story645 story645 merged commit d9b3449 into matplotlib:main Oct 6, 2023
meeseeksmachine pushed a commit to meeseeksmachine/matplotlib that referenced this pull request Oct 6, 2023
meeseeksmachine pushed a commit to meeseeksmachine/matplotlib that referenced this pull request Oct 6, 2023
@QuLogic QuLogic deleted the fix-anim-resize branch October 6, 2023 03:46
ksunden added a commit that referenced this pull request Oct 6, 2023
…006-on-v3.8.x

Backport PR #27006 on branch v3.8.x (DOC: Fix resizing of animation examples)
ksunden added a commit that referenced this pull request Oct 6, 2023
…006-on-v3.8.0-doc

Backport PR #27006 on branch v3.8.0-doc (DOC: Fix resizing of animation examples)
@ksunden ksunden mentioned this pull request Nov 2, 2023
5 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Documentation: examples files in galleries/examples
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants