Run tests using pytest
from the commandline instead. The variable matplotlib.default_test_modules
was only used for matplotlib.test()
and is thus removed as well.
To test an installed copy, be sure to specify both matplotlib
and mpl_toolkits
with --pyargs
:
python -m pytest --pyargs matplotlib.tests mpl_toolkits.tests
See testing
for more details.
~.Axes.pcolor and ~.Axes.pcolormesh previously remove any visible axes major grid. This behavior is removed; please explicitly call ax.grid(False)
to remove the grid.
See Behavioural API Changes 3.5 - Axes children combined
for more information; modification of the following sublists is no longer supported:
Axes.artists
Axes.collections
Axes.images
Axes.lines
Axes.patches
Axes.tables
Axes.texts
To remove an Artist, use its .Artist.remove method. To add an Artist, use the corresponding Axes.add_*
method.
The following Axes.add_*
methods will now raise if passed an unexpected type. See their documentation for the types they expect.
- .Axes.add_collection
- .Axes.add_image
- .Axes.add_line
- .Axes.add_patch
- .Axes.add_table
Previously, custom subclasses of .units.ConversionInterface needed to implement a convert
method that not only accepted instances of the unit, but also unitless values (which are passed through as is). This is no longer the case (convert
is never called with a unitless value), and such support in .StrCategoryConverter
is removed. Likewise, the .ConversionInterface.is_numlike
helper is removed.
Consider calling .Axis.convert_units instead, which still supports unitless values.
For Matplotlib 3.5 and 3.6 a proxy list was returned that simulated the return of .HandlerLine2DCompound.create_artists. Now a list containing only the single artist is return.
rcParams that expect a (non-pathlike) str no longer cast non-str inputs using str. This will avoid confusing errors in subsequent code if e.g. a list input gets implicitly cast to a str.
Previously, scales could be set case-insensitively (e.g., set_xscale("LoG")
). Now all builtin scales use lowercase names.
In .axes_grid1.axes_divider, various internal APIs no longer supports passing nx1 = None
or ny1 = None
to mean nx + 1
or ny + 1
, in preparation for a possible future API which allows indexing and slicing of dividers (possibly divider[a:b] == divider.new_locator(a, b)
, but also divider[a:] == divider.new_locator(a, <end>)
). The user-facing .Divider.new_locator API is unaffected -- it correctly normalizes nx1 = None
and ny1 = None
as needed.
The xy parameter is now required and keyword only. This was deprecated in 3.0 and originally slated to be removed in 3.5.