# Matplotlib — card for AI agents

Python library for creating static, animated and interactive plots and visualizations.

Category: Charts and data visualisation · PyPI package `matplotlib` · latest version 3.11.2 (checked 2026-11-01)
Install: `pip install matplotlib`
License: PSF-2.0 (permissive)

In your own product (generator, app, hosted service): **yes**. Permissive license: ship it inside your own product, closed or open source, and keep its license and copyright notice.

## Rules for AI agents (paste into AGENTS.md or CLAUDE.md)

## Matplotlib
- Install with one of the commands the docs list: `pip install matplotlib`, `conda install -c conda-forge matplotlib`, `pixi add matplotlib` or `uv add matplotlib`.
- When using uv with the `tkagg` window backend, follow the docs' warning: use uv 0.8.7 or newer (`uv self update`) and keep bundled Pythons current (`uv python upgrade --reinstall`).
- If that is not possible, the docs suggest another supported GUI framework, e.g. `uv add matplotlib pyside6`.
- Create figures through the top-level interfaces the docs name: `pyplot.figure`, `pyplot.subplots` or `pyplot.subplot_mosaic`.
- If GIFs saved with `PillowWriter` show frame skew, or HiDPI looks wrong in the Qt toolbar or WebAgg embeddings, check the installed version. The 3.11.2 release notes list fixes for both.
- If the project leads to a publication, add the citation the README asks for.
- Send general questions to Discourse, which the README calls the recommended starting point.

## Agent Skills for it
- matplotlib from K-Dense-AI/scientific-agent-skills: `npx skills add K-Dense-AI/scientific-agent-skills --skill matplotlib`
- matplotlib from zLanqing/codex-claude-academic-skills: `npx skills add zLanqing/codex-claude-academic-skills --skill matplotlib`

## What it is
- Matplotlib is a Python library for charts and figures. The README calls it "a comprehensive library for creating static, animated, and interactive visualizations in Python." The GitHub repository was created on 2011-02-19. The releases page lists v3.11.2 as the latest release and calls it "the second bugfix release of the 3.11.x series."
- The project site says neurobiologist John Hunter created it to work with EEG data. It then spread to many people in many fields. His stated goal was that Matplotlib "make easy things easy and hard things possible." The docs list `pyplot.figure`, `pyplot.subplots` and `pyplot.subplot_mosaic` as the top-level interfaces for creating figures.
- The README says it produces figures in hardcopy formats and in interactive environments across platforms. It also says it can be used in Python scripts, Python/IPython shells, web application servers and GUI toolkits.

## Caveats
- uv's Python builds and the tkagg window: The docs warn that uv usually installs its own Python builds, and that "only recent versions of those Python builds (August 2025) work properly with the tkagg backend" for showing plots in a window. They suggest another supported GUI framework as an alternative, for example `pyside6`.
- Backend bugs fixed only in a later point release: 3.11.2 is the second bugfix release of 3.11.x. Its fixes include crashes, frame skew in GIFs saved with `PillowWriter`, and HiDPI handling in the Qt toolbar and WebAgg embeddings. The notes do not say which earlier versions were affected.
- License terms are not in these sources: The GitHub repository metadata shows "License None". The docs site links to a License page under project information, but that page's text is not among the sources used here.
- Citation requested for published work: The maintainers ask that projects leading to publication cite Matplotlib. They link a ready-made citation entry.

## Numbers (AgentGid data)
- Gid Score: 82.0 (#69 of all tools, 2 of 95 in its category)
- Used in 167 public projects set up for AI coding agents (2.7%)
- Downloads last week: 51,435,986 (as of 2026-11-24), +16.2% over 4 weeks
- GitHub stars: 23,494 (as of 2026-11-24)
- Last push: 2026-11-23

## Often used with
NumPy 65.3%, pandas 61.1%, Pillow 42.5%, scikit-learn 41.3%, python-dotenv 35.3%, Seaborn 33.5%

## Checked alternatives (same job)
- Seaborn: https://agentgid.com/tools/seaborn/agent.md
- Plotly: https://agentgid.com/tools/plotly/agent.md
- Bokeh: https://agentgid.com/tools/bokeh/agent.md
- plotnine: https://agentgid.com/tools/plotnine/agent.md

## Links
- AgentGid page: https://agentgid.com/tools/matplotlib/
- Homepage: https://matplotlib.org
- Repository: https://github.com/matplotlib/matplotlib
- Source: https://github.com/matplotlib/matplotlib#readme
- Source: https://github.com/matplotlib/matplotlib
- Source: https://github.com/matplotlib/matplotlib/releases
- Source: https://matplotlib.org/stable/

---
AgentGid's catalog is curated: every entry was checked against the maker's official pages (registry, repository, license and pricing pages) on the date shown; a license value shows the quote it stands on wherever AgentGid has one. Usage numbers come from AgentGid's own scan of public repositories set up for AI coding agents. Claims by makers are reported, not tested by AgentGid.
