Matplotlib
Comprehensive Python library for creating static, animated, and interactive visualizations. Matplotlib provides a MATLAB-like API (pyplot) for quick plots and an object-oriented API for fine-grained control. Produces publication-quality figures in PNG, PDF, SVG. The foundational visualization library in Python's scientific stack — seaborn and pandas plotting are built on matplotlib.
Score Breakdown
⚙ Agent Friendliness
🔒 Security
Pure visualization library with no network access. No known security concerns. SVG output may include embedded data — be careful when serving matplotlib SVG output from user-provided data.
⚡ Reliability
Best When
You need fine-grained control over static publication-quality figures in Python scientific computing or data analysis workflows.
Avoid When
You need interactive web charts or modern statistical aesthetics out of the box — use Plotly or seaborn.
Use Cases
- • Create data analysis charts (line, bar, scatter, histogram, heatmap) for Jupyter notebooks and reports
- • Generate publication-quality figures for scientific papers with precise control over layout and typography
- • Visualize ML model results (confusion matrices, training curves, feature importance) in research pipelines
- • Create multi-panel figure layouts with subplots for complex data comparisons
- • Animate data over time with FuncAnimation for temporal data visualization
Not For
- • Interactive web dashboards — use Plotly or Bokeh for browser-based interactive charts
- • Large dataset visualization (>1M points) — use Datashader or Plotly with WebGL for performance
- • Modern statistical plots — seaborn provides more aesthetically pleasing statistical visualizations with less code
Interface
Authentication
Library with no auth requirement.
Pricing
Free and open source, maintained by Matplotlib community.
Agent Metadata
Known Gotchas
- ⚠ matplotlib.pyplot (plt) maintains implicit state — plt.figure() creates a new figure; calling plt.plot() without plt.figure() adds to the current figure; in notebooks or scripts with multiple plots, always create explicit figure objects
- ⚠ Non-interactive backends (Agg) don't open windows — in scripts, always call plt.savefig() not plt.show(); plt.show() does nothing with Agg backend
- ⚠ Figure size is in inches, not pixels — figsize=(10, 6) means 10x6 inches; multiply by dpi for pixel dimensions (100dpi × 10in = 1000px)
- ⚠ tight_layout() or constrained_layout=True required to prevent label/title overlap — default layout often clips axis labels; always call plt.tight_layout() before saving
- ⚠ Colors in matplotlib use 0-1 normalized RGB, not 0-255 — color=(0.5, 0.5, 0.5) is gray; using 255-scale values like (128, 128, 128) silently produces wrong colors
- ⚠ pandas DataFrame.plot() uses matplotlib under the hood — the returned Axes object can be further customized with matplotlib commands for fine-grained control
Full Evaluation Report
Detailed scoring breakdown, competitive positioning, security analysis, and improvement recommendations for Matplotlib.
Scores are editorial opinions as of 2026-03-06.