| name | matplotlib-pro |
| description | Professional sub-skill for Matplotlib focused on high-performance animations, complex multi-figure layouts (GridSpec), interactive widgets, and publication-ready typography (LaTeX/PGF). |
| version | 3.8 |
| license | PSF |
Matplotlib - Professional Viz & Animation
Beyond static plots, Matplotlib is a powerful engine for dynamic data visualization and scientific storytelling. This guide focuses on the "Pro" features: blitting for speed, Artist hierarchy for control, and LaTeX integration for papers.
When to Use
- Creating high-FPS animations for simulations (Fluid dynamics, N-body).
- Building custom interactive tools inside Jupyter or a GUI.
- Generating pixel-perfect figures for academic journals.
- Visualizing real-time data streams from sensors.
Core Principles
1. The Artist Hierarchy
Everything you see is an Artist. Figures contain Axes, Axes contain Lines, Text, Patches. Pro-level control means manipulating these objects directly instead of using high-level plt commands.
2. Blitting (The Secret to Speed)
Standard animation redraws the whole figure every frame (slow). Blitting only redraws the parts that changed (e.g., the moving line), while keeping the axes and labels cached as a background image.
3. Backend Mastery
- Agg: High-quality static PNGs.
- PDF/PGF: Vector-based for LaTeX.