You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP
Socket
Book a DemoInstallSign in
Socket

ez-animate

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ez-animate

A simple package to streamline Matplotlib animations.

0.1.0
pipPyPI
Maintainers
1

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!

FAQs

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts