Skip to main content

A simple package to streamline Matplotlib animations.

Project description

License Build Status Code Coverage Code style: ruff Site Status

ez-animate

A high-level, declarative Python package for creating common Matplotlib animations with minimal boilerplate code.

Project Goals

ez-animate aims to make it easy for data scientists, analysts, educators, and researchers to create standard Matplotlib animations quickly and with minimal code. It abstracts away the complexity of FuncAnimation, state management, and repetitive setup, letting you focus on your data and story.

Why?

  • Complex Setup: No need to write custom init and update functions.
  • State Management: Simplifies handling data and artist states between frames.
  • Repetitive Code: Reduces boilerplate for standard animations.

Who is it for?

  • Primary: Data scientists & analysts (exploratory analysis, presentations, notebooks)
  • Secondary: Students, educators, and researchers (learning, teaching, publications)

Features

  • Simple API: Create animations with a few lines of code
  • Tested & Linted: High code quality with pytest and ruff
  • Documentation: Built with MkDocs (TBD)

Installation

Pending PyPI release. For now, install directly from GitHub

pip install ez-animate

Quickstart

from ez_animate import RegressionAnimation

# Create and run the animation
animator = RegressionAnimation(
    model=Lasso,    # Scikit-learn or sega_learn model class
    X=X,
    y=y,
    test_size=0.25,
    dynamic_parameter="alpha",
    static_parameters={"max_iter": 1, "fit_intercept": True},
    keep_previous=True,
    metric_fn=Metrics.mean_squared_error,
)

# Set up the plot
animator.setup_plot(
    title="Regression Animation",
    xlabel="Feature Coefficient",
    ylabel="Target Value",
)

# Create the animation
animator.animate(frames=np.arange(0.01, 1.0, 0.01))

# Show and save the animation
animator.show()
animator.save("regression_animation.gif")

Full Documentation

See the documentation site for complete usage instructions, API references, and examples.

Development/Contributing

See DEVELOPMENT.md for full development and contributing guidelines.

Project Structure

ez-animate/
├─ .github/
│  ├─ ISSUE_TEMPLATE
│  └─ workflows
├─ examples/
│  ├─ plots
│  ├─ sega_learn
│  └─ sklearn
├─ src/
│  └─ ez_animate
└─ tests

License

This project is licensed under the terms of the MIT License.

Dependency Management

  • All dependencies are in pyproject.toml.
  • Core: [project.dependencies]
  • Other: [project.optional-dependencies]
  • Use uv pip install -e .[dev] to install all dev tools.

Acknowledgments

  • Built with inspiration from the Matplotlib community.
  • Thanks to all contributors!

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ez_animate-0.1.0.tar.gz (29.5 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

ez_animate-0.1.0-py3-none-any.whl (26.0 kB view details)

Uploaded Python 3

File details

Details for the file ez_animate-0.1.0.tar.gz.

File metadata

  • Download URL: ez_animate-0.1.0.tar.gz
  • Upload date:
  • Size: 29.5 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.7.19

File hashes

Hashes for ez_animate-0.1.0.tar.gz
Algorithm Hash digest
SHA256 010edc69c9bfd5330608905cea090b96fa14129f97d0cf66755fd42ae38a1ef3
MD5 0a339c3a8081626359f25d08b2bd0424
BLAKE2b-256 887656be3cc37b1cfcb5fe02af0568613b347eb3c9192c10e949b66366f6d4bc

See more details on using hashes here.

File details

Details for the file ez_animate-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: ez_animate-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 26.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.7.19

File hashes

Hashes for ez_animate-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 69f5224f9a34066828a2e52d65a4eb7c2dc6683ea84d71012aa03472e1b3b158
MD5 7a02d793535b08de04ab38b318011d21
BLAKE2b-256 f54cc7f7a01a8ebd2ecf7c303956fed6db28cfc7b65f0761efbd6fc1601884c5

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page