Registry / data / matplotlib

matplotlib

JSON →
library3.10.8pypypi✓ verified 49d ago

Matplotlib is a comprehensive library for creating static, animated, and interactive visualizations in Python. As of version 3.10.8, it continues to be actively maintained with regular updates and improvements.

data
pip install matplotlib
Install & Compatibility
Where this runs
tested against v3.10.9 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.103.925 runs
installs and imports cleanly · install 0.0s · import 2.478s · 177.5MB
glibc
py 3.103.925 runs
installs and imports cleanly · install 7.5s · import 2.326s · 170MB
178MB installed
● package 178MB
Code
Verified usage

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

pyplot
import matplotlib.pyplot as plt
Standard import for plotting functions

A basic example to create and display a simple line plot using Matplotlib.

import matplotlib.pyplot as plt # Create a simple line plot plt.plot([1, 2, 3], [1, 4, 9]) plt.title('Simple Plot') plt.xlabel('X-axis') plt.ylabel('Y-axis') plt.show()
Debug
Known issues
breakingThe default linewidth in `plot` has increased from 1 to 1.5 in version 3.10.8.
fix
To revert to the previous default, set `mpl.rcParams['lines.linewidth'] = 1.0`.
affects: 3.10.8
breakingThe dash patterns for line styles `'--'`, `':'`, and `'-.'` have changed in version 3.10.8.
fix
To restore the previous dash patterns, set `mpl.rcParams['lines.dashed_pattern'] = [6, 6]`.
affects: 3.10.8
breakingThe `errorbar` function no longer includes caps on error bars by default in version 3.10.8.
fix
To include caps, set `mpl.rcParams['errorbar.capsize'] = 3`.
affects: 3.10.8
breakingThe `boxplot` function's default styling has changed in version 3.10.8, including color and marker updates.
fix
To revert to the previous styling, set `mpl.rcParams['boxplot.flierprops.color'] = 'k'`.
affects: 3.10.8
gotchaThe test environment generated pip warnings about running pip as the 'root' user, which can lead to broken permissions, and a notice about a new pip release being available.
fix
It is recommended to run pip in a virtual environment instead of as the 'root' user. Additionally, consider updating pip to the latest version by running 'pip install --upgrade pip'.
affects: N/A
Errors
Common errors & fixes
ModuleNotFoundError: No module named 'matplotlib'
Matplotlib is not installed in the current Python environment.
fix
Install Matplotlib using pip: `pip install matplotlib`.
AttributeError: module 'matplotlib' has no attribute 'plot'
Incorrect import statement; 'matplotlib' module does not have a 'plot' attribute.
fix
Import the 'pyplot' submodule: `import matplotlib.pyplot as plt`.
ImportError: DLL load failed while importing _path: The specified module could not be found.
Missing or corrupted DLL files required by Matplotlib on Windows.
fix
Ensure the Microsoft Visual C++ Redistributable is installed, or reinstall Matplotlib.
OSError: 'seaborn' is not a valid package style, path of style file, URL of style file, or library style name
Using 'plt.style.use('seaborn')' is deprecated and removed in Matplotlib 3.7.0.
fix
Use Seaborn's own styling functions or update to a compatible Matplotlib version.
ImportError: No module named 'matplotlib.backends.registry'
Incomplete or corrupted Matplotlib installation.
fix
Uninstall and reinstall Matplotlib to ensure a clean installation.
Upgrade
Version history
3.10.9latest on PyPI
Audit
Dependencies
numpyrequiredRequired for numerical operations
pillowrequiredRequired for image processing
Agent activity
15 hits · last 30 days
node
4
seranking-bot
4
ahrefsbot
3
Resources