Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork7.9k
Feature Proposal: SVGFuncAnimation#20142
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
base:main
Are you sure you want to change the base?
Uh oh!
There was an error while loading.Please reload this page.
Conversation
Perhaps give us a mock example in the PR description? |
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.
Thank you for opening your first PR into Matplotlib!
If you have not heard from us in a while, please feel free to ping@matplotlib/developers
or anyone who has commented on the PR. Most of our reviewers are volunteers and sometimes things fall through the cracks.
You can also join uson gitter for real-time discussion.
For details on testing, writing docs, and our review process, please seethe developer guide
We strive to be a welcoming and open project. Please follow ourCode of Conduct.
jungerm2 commentedMay 3, 2021 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
It looks like the signature of functool's lru_cache changed after py37. Should be a quick fix, I'll push an update to this shortly. EDIT: It's fixed now. All tests pass 👍 |
What makes this specifically need to be an |
Originally, instead of hooking into the SVG backend to intercept the frame data, I had it parse every frame separately which meant it couldn't be just a One of the subtleties with making it a |
@tacaswell, you encouraged this to be PRd, so I'll ping you to shepherd this through if you have the bandwidth?@jungerm2 did a lot of work here, and it seems reasonable to me, but its a lot of new code... |
tacaswell commentedMay 15, 2021 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
I will not realistically have bandwidth to look at this until next week. @jungerm2 If you do not hear from me by May 26 please ping me! |
Will do, Thanks! Let me know if there's anything I can help with too (time permitting). But as@QuLogic mentioned it might make more sense to make this into a |
@tacaswell were you able to take a look at this PR yet? |
Hi@jungerm2 - I'm sorry this fell through the cracks, are you interested in continuing this work? If so, please mark the PR as ready for review and let us know if you need help with the rebase, we haveinstructions for that here. Thanks! |
Hey, thanks for getting back to me! It's been a while since I've worked on this but still think it would add value to matplotlib, but it seems there are quite a few merge conflicts now. And as I've said this might be better implemented as a If there's sufficient interest I might pick this back up but don't have the bandwidth to merge this in at the moment. |
I took the liberty of doing the rebase. |
Uh oh!
There was an error while loading.Please reload this page.
PR Summary
This PR stems from#19694. It implements a new animation class
SVGFuncAnimation
that exclusively creates SVG animations. Because of this restriction, it can reuse components that are common between frames and thus only minimally updates the SVG dom for each frame. In my tests, I found that this results in a speedup of up to 30x and about half the memory footprint as compared to the standardFuncAnimation
.It's meant to be (almost) a drop-in for
FuncAnimation
and can be used as such:I have a few other exampleshere and a basic benchmarkhere.
This is a new feature (and my first PR here) so I suspect there'll be some discussion about what the proper API for this is and quite a few things to correct/fix. This is part of the reason I have yet to write more extensive docs. Any and all feedback is welcomed!
PR Checklist
pytest
passes).flake8
on changed files to check).flake8-docstrings
and runflake8 --docstring-convention=all
).doc/users/next_whats_new/
(follow instructions in README.rst there).doc/api/next_api_changes/
(follow instructions in README.rst there).