pypi / matplotlib
matplotlib
What changed in matplotlib 2 to 3, from its official release notes, upgrade guides and advisories. Sources checked 2026-11-30.
6 breaking1 security1 new APIs and options3 performance4 behavior and defaults21 fixes and other
See which of these apply to your code, ranked, in your agent:
npx @unstale/cli initmatplotlib 326 changes
Breaking changes 1
Removes shell escapes from Latex and PS calls as a security hardening measure.
Security 1
Removes eval usage from cycler validation as a security hardening measure.
New APIs and options 1
The release adds accessible colour sequences.
Performance 2
RGBA-stage image resampling is faster.
The release includes performance improvements.
Behavior and default changes 1
Text and font processing has been overhauled to support modern font features and full internationalization in all languages.
Fixes and other changes 20
Fixes incorrect glyphs.
Fixes drawing an empty collection.
Fixes clipping in PDF output.
Fixes HiDPI handling in Qt toolbars and WebAgg embeddings.
Fixes hatch linewidth and color.
Fixes frame skew when saving GIF animations.
Fixes handling of internal braces.
Fixes handling of
ResizeEvent.Axis labels are no longer clipped when using tight layout.
Inverted axes on 3D plots are fixed.
Restoring auto aspect on 3D axes after switching from equal is fixed.
Reported mouse positions are no longer occasionally misaligned; a canvas height bug is also fixed.
Cursor formatting for uint8 images using NoNorm is fixed.
Tight layout now works correctly with multiple subplots when sharey=True.
Missing glyphs when subsetting Type 1 fonts in PDF are fixed.
Oversized embedding of Type 42 fonts in PDF and PostScript files is fixed.
3D Axes have been improved.
The release adds improvements for flexible figure management.
The MacOS backend now properly allows freethreaded mode.
Error handling for the MacOS backend is improved.
matplotlib 210 changes
Breaking changes 5
The default color cycle is modernized.
The default colormap changes from jet to viridis.
The default font changes to DejaVu, with support for most Western alphabets, math symbols, and emoji out of the box.
Line dash patterns scale with linewidth.
Ticks are out by default and appear only on the right and bottom spines.
Performance 1
Text rendering is faster.
Behavior and default changes 3
Auto-limits are improved.
Auto-ticking is improved, particularly for log scales and dates.
Many more functions respect the color cycle.
Fixes and other changes 1
Image support is improved: imshow respects scales and eliminates a class of artifacts.