Registry / devops / matplotlib-stubs

matplotlib-stubs

JSON →
library0.3.11pypypi✓ verified 84d ago

Unofficial type stubs for the matplotlib package, enabling type checking and autocompletion. Current version 0.3.11, released on 2024-01-21. Development is active but with infrequent releases.

pip install matplotlib-stubs
INSTALL
IMPORT
SIG · MATPLOTLIB-STUBS
M
matplotlib-stubs
devopspythonv0.3.11
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

pyplot
from matplotlib import pyplot
from matplotlib-stubs import pyplot
The stubs package itself is not imported directly; it provides type information for matplotlib.
Figure
from matplotlib.figure import Figure

Basic plot usage that benefits from the stubs.

import matplotlib.pyplot as plt fig, ax = plt.subplots() ax.plot([1, 2, 3], [1, 4, 9]) plt.show()
Debug
Known issues
gotchaThe stubs may not cover all matplotlib APIs; missing stubs cause type errors.
fix
Use `# type: ignore` or contribute missing stubs.
affects: all
gotchaSome stubs are based on older matplotlib versions; may not match latest matplotlib API.
fix
Keep both packages updated and verify functionality.
affects: all
Errors
Common errors & fixes
Import 'matplotlib-stubs' could not be resolved
Directly importing the stubs package as if it were a library.
fix
Do not import matplotlib-stubs; just use regular matplotlib imports. The stubs are automatically used by type checkers.
Module 'matplotlib' has no attribute 'pyplot'
Stubs missing for some submodules leading to incomplete type information.
fix
Update to latest version of both matplotlib and matplotlib-stubs, or use a workaround like `from matplotlib import pyplot as plt`.
Upgrade
Version history
0.3.11latest on PyPI · released Oct 24, 2025
Audit
Dependencies
matplotlibrequiredStubs are for matplotlib; must be installed separately.
Agent activity
6 hits · last 30 days
node
6
Resources
matplotlib-stubs — pip install matplotlib-stubs · libregistry