Matplotlib: Python Plotting Package
raw JSON → 3.10.8 verified Tue May 12 auth: no python install: verified quickstart: verified
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.
pip install matplotlib Common errors
error ModuleNotFoundError: No module named 'matplotlib' ↓
cause Matplotlib is not installed in the current Python environment.
fix
Install Matplotlib using pip:
pip install matplotlib. error AttributeError: module 'matplotlib' has no attribute 'plot' ↓
cause Incorrect import statement; 'matplotlib' module does not have a 'plot' attribute.
fix
Import the 'pyplot' submodule:
import matplotlib.pyplot as plt. error ImportError: DLL load failed while importing _path: The specified module could not be found. ↓
cause Missing or corrupted DLL files required by Matplotlib on Windows.
fix
Ensure the Microsoft Visual C++ Redistributable is installed, or reinstall Matplotlib.
error OSError: 'seaborn' is not a valid package style, path of style file, URL of style file, or library style name ↓
cause 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.
error ImportError: No module named 'matplotlib.backends.registry' ↓
cause Incomplete or corrupted Matplotlib installation.
fix
Uninstall and reinstall Matplotlib to ensure a clean installation.
Warnings
breaking The 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`.
breaking The 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]`.
breaking The `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`.
breaking The `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'`.
gotcha The 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'.
Install compatibility verified last tested: 2026-05-12
python os / libc status wheel install import disk
3.10 alpine (musl) - - 2.27s 177.1M
3.10 slim (glibc) - - 1.56s 169M
3.11 alpine (musl) - - 3.22s 192.5M
3.11 slim (glibc) - - 2.73s 183M
3.12 alpine (musl) - - 2.69s 179.5M
3.12 slim (glibc) - - 2.75s 170M
3.13 alpine (musl) - - 2.44s 178.7M
3.13 slim (glibc) - - 2.93s 169M
3.9 alpine (musl) - - 2.13s 181.2M
3.9 slim (glibc) - - 1.95s 176M
Imports
- pyplot
import matplotlib.pyplot as plt
Quickstart verified last tested: 2026-04-23
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()