Skip to content
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

Switch animation to fastplotlib? #279

Open
billbrod opened this issue Aug 8, 2024 · 0 comments
Open

Switch animation to fastplotlib? #279

billbrod opened this issue Aug 8, 2024 · 0 comments

Comments

@billbrod
Copy link
Collaborator

billbrod commented Aug 8, 2024

Currently, have some custom matplolib animation functions that are a mess. Can rewrite to use fastplotlib in a simpler manner. Right now, however, their axes objects aren't in a released version, so wait until that's happened.

  • Beforehand, can restructure how the model display code works. Instead of creating a plot, should return a dictionary whose keys are subplot titles and whose values are either arrays. If the plot should be images, the arrays should be 2d. If they should be stem plots, they should be 1d. In both cases, can add an optional iteration dimension, in order to animate over time.
  • When writing fastplotlib animation functions, should probably maintain the matplotlib ones for a while, and then deprecate them, since fastplotlib is still in development and interface may change.
  • Refer to fastplotlib quickstart for how to do much of the animations, but should be relatively straightforward.
  • Fastplotlib doesn't concern itself with static images, so maintain the matplotlib code (and, in particular, imshow) for them
  • Make sure fastplotlib animations work with documentation first. They had to use pygfx's custom scraper in order to get the animations working with their sphinx documentation (in particular, sphinx-gallery). Unsure how this will interact with myst-nb, so figure out how to get that working first.
  • When setting up the Binder at FENS, needed to make sure that xorg was included in order for it to work (since the nodes are headless). But lavapipe (with CPU, rather than having a GPU) should be sufficient for the kinds of videos we make.
  • Removing the animate functions would remove our ffmpeg dependency.
  • fastplotlib not currently on conda-forge, so either: they add it to conda-forge, or we make it an optional dependency
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant