Skip to content

animation helpers#1229

Merged
ddkohler merged 91 commits into
masterfrom
animations
May 21, 2026
Merged

animation helpers#1229
ddkohler merged 91 commits into
masterfrom
animations

Conversation

@ddkohler

@ddkohler ddkohler commented Mar 12, 2026

Copy link
Copy Markdown
Contributor

Changes

The intent here is to wrap matplotlib.animations.FuncAnimate so that it can handle data objects, interact2D figures, or quick[1/2]D-formatted figures and produce animations.

To make this work with quick plotters, a significant refactor was done.

Added

  • animate.animate2D: versatile conversion of data to animation; lots of matplotlib customizations
  • animate.animate_interact2D: create an animation from an interact2D object. The animation walks all the sliders.
  • animate_quick: create an animation whose frames are the figures that would be created in a quick1D or quick2D call
  • Quick2DIterator, Quick1DIterator: iterator classes for making figures for each object in a data chop.
  • arists: quick2Ds, quick1Ds: functions that generate the quick iterator classes using explicit arguments.

Changed

  • interact2D has a static output type (rather than a SimpleNamespace instance) to clearly convey the inputs for animate_interact2D.
  • quick1D, quick2D: refactored for integration with iterators, animations (these functions are wrappers for the class Quick1DLegacy, Quick2DLegacy).

TODO

  • wt5 animate entry point discarding; can be added at later time
  • incorporate snaking (for 4+ dimensions) discarding as a low priority
  • incorporate back-and-forth option (to avoid jagged animation endings)
  • animate2D: options for plotting something other than the final two axes discarding; can be added at later time
  • refactor artists.quick (minimize redundancy between iterator- and list-based functions)

Checklist

  • added tests, if applicable
  • updated documentation, if applicable
  • updated CHANGELOG.md
  • tests pass

from ._helpers import *
from ._quick import *
from ._interact import *
from ._quick import *

Check notice

Code scanning / CodeQL

'import *' may pollute namespace Note

Import pollutes the enclosing namespace, as the imported module
WrightTools.artists._quick
does not define '__all__'.
@ddkohler ddkohler changed the title [WIP] animation helpers animation helpers Apr 26, 2026
@ddkohler ddkohler marked this pull request as ready for review April 26, 2026 20:56
@ddkohler

Copy link
Copy Markdown
Contributor Author

It looks like this is far enough along that we can merge now and deal with issues as they come.

@ddkohler ddkohler merged commit 5b0fdc8 into master May 21, 2026
11 checks passed
@ddkohler ddkohler deleted the animations branch May 21, 2026 19:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Development

Successfully merging this pull request may close these issues.

artists.quick: iterator implementation

2 participants