From d905ba24ff66870827ade897092dacb0e314ef65 Mon Sep 17 00:00:00 2001 From: Elliott Sales de Andrade Date: Fri, 8 May 2026 22:53:01 -0400 Subject: [PATCH 1/4] DOC: Coalesce API development changes for 3.11 --- .../deprecations/29904-tac.rst | 16 --------- .../next_api_changes/development/29181-ES.rst | 11 ------ .../next_api_changes/development/29745-DS.rst | 4 --- .../next_api_changes/development/30143-ES.rst | 7 ---- .../prev_api_changes/api_changes_3.11.0.rst | 8 +++++ .../api_changes_3.11.0/development.rst | 36 +++++++++++++++++++ doc/release/release_notes.rst | 10 +++++- 7 files changed, 53 insertions(+), 39 deletions(-) delete mode 100644 doc/api/next_api_changes/deprecations/29904-tac.rst delete mode 100644 doc/api/next_api_changes/development/29181-ES.rst delete mode 100644 doc/api/next_api_changes/development/29745-DS.rst delete mode 100644 doc/api/next_api_changes/development/30143-ES.rst create mode 100644 doc/api/prev_api_changes/api_changes_3.11.0.rst create mode 100644 doc/api/prev_api_changes/api_changes_3.11.0/development.rst diff --git a/doc/api/next_api_changes/deprecations/29904-tac.rst b/doc/api/next_api_changes/deprecations/29904-tac.rst deleted file mode 100644 index 8e4f986ffa77..000000000000 --- a/doc/api/next_api_changes/deprecations/29904-tac.rst +++ /dev/null @@ -1,16 +0,0 @@ - -Increase to minimum supported versions of dependencies -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -For Matplotlib 3.11, the :ref:`minimum supported versions ` are -being bumped: - -+------------+-----------------+----------------+ -| Dependency | min in mpl3.10 | min in mpl3.11 | -+============+=================+================+ -| Python | 3.10 | 3.11 | -| NumPy | 1.23 | 1.25 | -+------------+-----------------+----------------+ - -This is consistent with our :ref:`min_deps_policy` and `SPEC0 -`__ diff --git a/doc/api/next_api_changes/development/29181-ES.rst b/doc/api/next_api_changes/development/29181-ES.rst deleted file mode 100644 index a3c7e5eed448..000000000000 --- a/doc/api/next_api_changes/development/29181-ES.rst +++ /dev/null @@ -1,11 +0,0 @@ -pip 25.1 suggested for development -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -Dependencies for development (build and testing) are now specified as `Dependency Groups -`_ -instead of `individual requirements files -`_. - -Consequently, a version of pip that supports Dependency Groups is suggested, namely -version 25.1 or higher. Note that if you install build/testing dependencies manually (by -copying the list from ``pyproject.toml``), then an older version of pip is sufficient. diff --git a/doc/api/next_api_changes/development/29745-DS.rst b/doc/api/next_api_changes/development/29745-DS.rst deleted file mode 100644 index 7d9b1c2b143b..000000000000 --- a/doc/api/next_api_changes/development/29745-DS.rst +++ /dev/null @@ -1,4 +0,0 @@ -New minimum version of pyparsing -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -The minimum required version of ``pyparsing`` has been updated from 2.3.1 to 3.0.0. diff --git a/doc/api/next_api_changes/development/30143-ES.rst b/doc/api/next_api_changes/development/30143-ES.rst deleted file mode 100644 index 2d79ad6bbe9d..000000000000 --- a/doc/api/next_api_changes/development/30143-ES.rst +++ /dev/null @@ -1,7 +0,0 @@ -Glyph indices now typed distinctly from character codes -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -Previously, character codes and glyph indices were both typed as `int`, which means you -could mix and match them erroneously. While the character code can't be made a distinct -type (because it's used for `chr`/`ord`), typing glyph indices as a distinct type means -these can't be fully swapped. diff --git a/doc/api/prev_api_changes/api_changes_3.11.0.rst b/doc/api/prev_api_changes/api_changes_3.11.0.rst new file mode 100644 index 000000000000..9e437e068dfb --- /dev/null +++ b/doc/api/prev_api_changes/api_changes_3.11.0.rst @@ -0,0 +1,8 @@ +API Changes for 3.11.0 +====================== + +.. contents:: + :local: + :depth: 1 + +.. include:: /api/prev_api_changes/api_changes_3.10.0/development.rst diff --git a/doc/api/prev_api_changes/api_changes_3.11.0/development.rst b/doc/api/prev_api_changes/api_changes_3.11.0/development.rst new file mode 100644 index 000000000000..44efd0586d75 --- /dev/null +++ b/doc/api/prev_api_changes/api_changes_3.11.0/development.rst @@ -0,0 +1,36 @@ +Increase to minimum supported versions of dependencies +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +For Matplotlib 3.11, the :ref:`minimum supported versions ` are being +bumped: + ++------------+-----------------+----------------+ +| Dependency | min in mpl3.10 | min in mpl3.11 | ++============+=================+================+ +| Python | 3.10 | 3.11 | +| NumPy | 1.23 | 1.25 | +| pyparsing | 2.3.1 | 3.0.0 | ++------------+-----------------+----------------+ + +This is consistent with our :ref:`min_deps_policy` and `SPEC0 +`__ + +pip 25.1 suggested for development +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Dependencies for development (build and testing) are now specified as `Dependency Groups +`_ +instead of `individual requirements files +`_. + +Consequently, a version of pip that supports Dependency Groups is suggested, namely +version 25.1 or higher. Note that if you install build/testing dependencies manually (by +copying the list from ``pyproject.toml``), then an older version of pip is sufficient. + +Glyph indices now typed distinctly from character codes +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Previously, character codes and glyph indices were both typed as `int`, which means you +could mix and match them erroneously. While the character code can't be made a distinct +type (because it's used for `chr`/`ord`), typing glyph indices as a distinct type means +these can't be fully swapped. diff --git a/doc/release/release_notes.rst b/doc/release/release_notes.rst index e2cd258ee3a7..cbceb4978121 100644 --- a/doc/release/release_notes.rst +++ b/doc/release/release_notes.rst @@ -13,6 +13,14 @@ Release notes .. include:: release_notes_next.rst +Version 3.11 +^^^^^^^^^^^^ +.. toctree:: + :maxdepth: 1 + + ../api/prev_api_changes/api_changes_3.11.0.rst + github_stats.rst + Version 3.10 ^^^^^^^^^^^^ .. toctree:: @@ -23,7 +31,7 @@ Version 3.10 ../api/prev_api_changes/api_changes_3.10.7.rst ../api/prev_api_changes/api_changes_3.10.1.rst ../api/prev_api_changes/api_changes_3.10.0.rst - github_stats.rst + prev_whats_new/github_stats_3.10.9.rst prev_whats_new/github_stats_3.10.8.rst prev_whats_new/github_stats_3.10.7.rst prev_whats_new/github_stats_3.10.6.rst From 65dcd6d983c1900c8d9af7eee4eccf782711538f Mon Sep 17 00:00:00 2001 From: Elliott Sales de Andrade Date: Fri, 8 May 2026 23:11:44 -0400 Subject: [PATCH 2/4] DOC: Coalesce API removals for 3.11 --- .../next_api_changes/removals/29697-REC.rst | 10 --- .../next_api_changes/removals/30005-DS.rst | 11 --- .../next_api_changes/removals/30014-DS.rst | 4 - .../next_api_changes/removals/30015-DS.rst | 9 -- .../next_api_changes/removals/30067-OG.rst | 23 ----- .../next_api_changes/removals/31588-ES.rst | 18 ---- .../prev_api_changes/api_changes_3.11.0.rst | 2 + .../api_changes_3.11.0/removals.rst | 83 +++++++++++++++++++ 8 files changed, 85 insertions(+), 75 deletions(-) delete mode 100644 doc/api/next_api_changes/removals/29697-REC.rst delete mode 100644 doc/api/next_api_changes/removals/30005-DS.rst delete mode 100644 doc/api/next_api_changes/removals/30014-DS.rst delete mode 100644 doc/api/next_api_changes/removals/30015-DS.rst delete mode 100644 doc/api/next_api_changes/removals/30067-OG.rst delete mode 100644 doc/api/next_api_changes/removals/31588-ES.rst create mode 100644 doc/api/prev_api_changes/api_changes_3.11.0/removals.rst diff --git a/doc/api/next_api_changes/removals/29697-REC.rst b/doc/api/next_api_changes/removals/29697-REC.rst deleted file mode 100644 index 0155578f0c21..000000000000 --- a/doc/api/next_api_changes/removals/29697-REC.rst +++ /dev/null @@ -1,10 +0,0 @@ -``plot_date`` -~~~~~~~~~~~~~ - -Use of ``plot_date`` has been discouraged since Matplotlib 3.5 and deprecated -since 3.9. The ``plot_date`` function has now been removed. - -- ``datetime``-like data should directly be plotted using `~.Axes.plot`. -- If you need to plot plain numeric data as :ref:`date-format` or need to set - a timezone, call ``ax.xaxis.axis_date`` / ``ax.yaxis.axis_date`` before - `~.Axes.plot`. See `.Axis.axis_date`. diff --git a/doc/api/next_api_changes/removals/30005-DS.rst b/doc/api/next_api_changes/removals/30005-DS.rst deleted file mode 100644 index a5ba482c848f..000000000000 --- a/doc/api/next_api_changes/removals/30005-DS.rst +++ /dev/null @@ -1,11 +0,0 @@ -``matplotlib.cm.get_cmap`` -~~~~~~~~~~~~~~~~~~~~~~~~~~ - -Colormaps are now available through the `.ColormapRegistry` accessible via -`matplotlib.colormaps` or `matplotlib.pyplot.colormaps`. - -If you have the name of a colormap as a string, you can use a direct lookup, -``matplotlib.colormaps[name]`` or ``matplotlib.pyplot.colormaps[name]`` . Alternatively, ``matplotlib.colormaps.get_cmap`` will -maintain the existing behavior of additionally passing through `.Colormap` instances -and converting ``None`` to the default colormap. `matplotlib.pyplot.get_cmap` will stay as a -shortcut to ``matplotlib.colormaps.get_cmap``. diff --git a/doc/api/next_api_changes/removals/30014-DS.rst b/doc/api/next_api_changes/removals/30014-DS.rst deleted file mode 100644 index d13737f17e40..000000000000 --- a/doc/api/next_api_changes/removals/30014-DS.rst +++ /dev/null @@ -1,4 +0,0 @@ -``GridHelperCurveLinear.get_tick_iterator`` -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -... is removed with no replacement. diff --git a/doc/api/next_api_changes/removals/30015-DS.rst b/doc/api/next_api_changes/removals/30015-DS.rst deleted file mode 100644 index e5f17518a9f3..000000000000 --- a/doc/api/next_api_changes/removals/30015-DS.rst +++ /dev/null @@ -1,9 +0,0 @@ -*nth_coord* parameter to axisartist helpers for fixed axis -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -Helper APIs in `.axisartist` for generating a "fixed" axis on rectilinear axes -(`.FixedAxisArtistHelperRectilinear`) no longer take a *nth_coord* parameter. -That parameter is entirely inferred from the (required) *loc* parameter. - -For curvilinear axes, the *nth_coord* parameter remains supported (it affects -the *ticks*, not the axis position itself), but it is now keyword-only. diff --git a/doc/api/next_api_changes/removals/30067-OG.rst b/doc/api/next_api_changes/removals/30067-OG.rst deleted file mode 100644 index 1a8d8bc5c2c5..000000000000 --- a/doc/api/next_api_changes/removals/30067-OG.rst +++ /dev/null @@ -1,23 +0,0 @@ -``TransformNode.is_bbox`` -^^^^^^^^^^^^^^^^^^^^^^^^^ - -... is removed. Instead check the object using ``isinstance(..., BboxBase)``. - -``rcsetup.interactive_bk``, ``rcsetup.non_interactive_bk`` and ``rcsetup.all_backends`` -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -... are removed and replaced by ``matplotlib.backends.backend_registry.list_builtin`` -with the following arguments - -- ``matplotlib.backends.BackendFilter.INTERACTIVE`` -- ``matplotlib.backends.BackendFilter.NON_INTERACTIVE`` -- ``None`` - -``BboxTransformToMaxOnly`` -^^^^^^^^^^^^^^^^^^^^^^^^^^ - -... is removed. It can be replaced by ``BboxTransformTo(LockableBbox(bbox, x0=0, y0=0))``. - -*interval* parameter of ``TimerBase.start`` -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -The timer interval parameter can no longer be set while starting it. The interval can be specified instead in the timer constructor, or by setting the timer.interval attribute. diff --git a/doc/api/next_api_changes/removals/31588-ES.rst b/doc/api/next_api_changes/removals/31588-ES.rst deleted file mode 100644 index 8709c5a77f5f..000000000000 --- a/doc/api/next_api_changes/removals/31588-ES.rst +++ /dev/null @@ -1,18 +0,0 @@ -``boxplot`` tick labels -^^^^^^^^^^^^^^^^^^^^^^^ - -The parameter *labels* has been removed in favour of *tick_labels* for clarity and -consistency with `~.Axes.bar`. - -Image path semantics of toolmanager-based tools -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -Previously, MEP22 ("toolmanager-based") Tools would try to load their icon -(``tool.image``) relative to the current working directory, or, as a fallback, from -Matplotlib's own image directory. Because both approaches are problematic for -third-party tools (the end-user may change the current working directory at any time, -and third-parties cannot add new icons in Matplotlib's image directory), this behavior -has been removed; instead, ``tool.image`` is now interpreted relative to the directory -containing the source file where the ``Tool.image`` class attribute is defined. -(Defining ``tool.image`` as an absolute path also works and is compatible with both the -old and the new semantics.) diff --git a/doc/api/prev_api_changes/api_changes_3.11.0.rst b/doc/api/prev_api_changes/api_changes_3.11.0.rst index 9e437e068dfb..5d9dd7ad50ba 100644 --- a/doc/api/prev_api_changes/api_changes_3.11.0.rst +++ b/doc/api/prev_api_changes/api_changes_3.11.0.rst @@ -5,4 +5,6 @@ API Changes for 3.11.0 :local: :depth: 1 +.. include:: /api/prev_api_changes/api_changes_3.10.0/removals.rst + .. include:: /api/prev_api_changes/api_changes_3.10.0/development.rst diff --git a/doc/api/prev_api_changes/api_changes_3.11.0/removals.rst b/doc/api/prev_api_changes/api_changes_3.11.0/removals.rst new file mode 100644 index 000000000000..74f0d7f3a19d --- /dev/null +++ b/doc/api/prev_api_changes/api_changes_3.11.0/removals.rst @@ -0,0 +1,83 @@ +``matplotlib.cm.get_cmap`` +~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Colormaps are now available through the `.ColormapRegistry` accessible via +`matplotlib.colormaps` or `matplotlib.pyplot.colormaps`. + +If you have the name of a colormap as a string, you can use a direct lookup, +``matplotlib.colormaps[name]`` or ``matplotlib.pyplot.colormaps[name]``. Alternatively, +``matplotlib.colormaps.get_cmap`` will maintain the existing behavior of additionally +passing through `.Colormap` instances and converting ``None`` to the default colormap. +`matplotlib.pyplot.get_cmap` will stay as a shortcut to +``matplotlib.colormaps.get_cmap``. + +``boxplot`` tick labels +^^^^^^^^^^^^^^^^^^^^^^^ + +The parameter *labels* has been removed in favour of *tick_labels* for clarity and +consistency with `~.Axes.bar`. + +``plot_date`` +~~~~~~~~~~~~~ + +Use of ``plot_date`` has been discouraged since Matplotlib 3.5 and deprecated since 3.9. +The ``plot_date`` function has now been removed. + +- ``datetime``-like data should directly be plotted using `~.Axes.plot`. +- If you need to plot plain numeric data as :ref:`date-format` or need to set a + timezone, call ``ax.xaxis.axis_date`` / ``ax.yaxis.axis_date`` before `~.Axes.plot`. + See `.Axis.axis_date`. + +``GridHelperCurveLinear.get_tick_iterator`` +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +... is removed with no replacement. + +*nth_coord* parameter to axisartist helpers for fixed axis +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Helper APIs in `.axisartist` for generating a "fixed" axis on rectilinear axes +(`.FixedAxisArtistHelperRectilinear`) no longer take a *nth_coord* parameter. +That parameter is entirely inferred from the (required) *loc* parameter. + +For curvilinear axes, the *nth_coord* parameter remains supported (it affects +the *ticks*, not the axis position itself), but it is now keyword-only. + +``rcsetup.interactive_bk``, ``rcsetup.non_interactive_bk`` and ``rcsetup.all_backends`` +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +... are removed and replaced by ``matplotlib.backends.backend_registry.list_builtin`` +with the following arguments + +- ``matplotlib.backends.BackendFilter.INTERACTIVE`` +- ``matplotlib.backends.BackendFilter.NON_INTERACTIVE`` +- ``None`` + +*interval* parameter of ``TimerBase.start`` +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +The timer interval parameter can no longer be set while starting it. The interval can be +specified instead in the timer constructor, or by setting the timer.interval attribute. + +``TransformNode.is_bbox`` +~~~~~~~~~~~~~~~~~~~~~~~~~ + +... is removed. Instead check the object using ``isinstance(..., BboxBase)``. + +``BboxTransformToMaxOnly`` +~~~~~~~~~~~~~~~~~~~~~~~~~~ + +... is removed. It can be replaced by ``BboxTransformTo(LockableBbox(bbox, x0=0, y0=0))``. + +Image path semantics of toolmanager-based tools +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +Previously, MEP22 ("toolmanager-based") Tools would try to load their icon +(``tool.image``) relative to the current working directory, or, as a fallback, from +Matplotlib's own image directory. Because both approaches are problematic for +third-party tools (the end-user may change the current working directory at any time, +and third-parties cannot add new icons in Matplotlib's image directory), this behavior +has been removed; instead, ``tool.image`` is now interpreted relative to the directory +containing the source file where the ``Tool.image`` class attribute is defined. +(Defining ``tool.image`` as an absolute path also works and is compatible with both the +old and the new semantics.) From 8c99cb9cc86a2f21ef5c1943de18c803b5ceed0f Mon Sep 17 00:00:00 2001 From: Elliott Sales de Andrade Date: Fri, 8 May 2026 23:40:16 -0400 Subject: [PATCH 3/4] DOC: Coalesce API behaviour changes for 3.11 --- .../next_api_changes/behavior/28437-CH.rst | 11 - .../next_api_changes/behavior/29054-AL.rst | 11 - .../next_api_changes/behavior/29256_IMT.rst | 6 - .../next_api_changes/behavior/29827-ES.rst | 6 - .../next_api_changes/behavior/29832-REC.rst | 11 - .../next_api_changes/behavior/29958-TH.rst | 8 - .../next_api_changes/behavior/30108-REC.rst | 6 - .../next_api_changes/behavior/30272-ES.rst | 2 - .../next_api_changes/behavior/30318-ES.rst | 9 - .../next_api_changes/behavior/30335-ES.rst | 15 -- .../next_api_changes/behavior/30532-TH.rst | 4 - .../next_api_changes/behavior/30634-AL.rst | 6 - .../next_api_changes/behavior/30824-AYS.rst | 6 - .../next_api_changes/behavior/30975-VM.rst | 9 - .../next_api_changes/behavior/31021-AYS.rst | 7 - .../next_api_changes/behavior/31148-ES.rst | 6 - .../next_api_changes/behavior/31223-AS.rst | 28 --- .../next_api_changes/behavior/31486-ES.rst | 6 - .../next_api_changes/behavior/31530-TZ.rst | 6 - .../next_api_changes/behavior/31578-TH.rst | 10 - .../prev_api_changes/api_changes_3.11.0.rst | 2 + .../api_changes_3.11.0/behaviour.rst | 199 ++++++++++++++++++ 22 files changed, 201 insertions(+), 173 deletions(-) delete mode 100644 doc/api/next_api_changes/behavior/28437-CH.rst delete mode 100644 doc/api/next_api_changes/behavior/29054-AL.rst delete mode 100644 doc/api/next_api_changes/behavior/29256_IMT.rst delete mode 100644 doc/api/next_api_changes/behavior/29827-ES.rst delete mode 100644 doc/api/next_api_changes/behavior/29832-REC.rst delete mode 100644 doc/api/next_api_changes/behavior/29958-TH.rst delete mode 100644 doc/api/next_api_changes/behavior/30108-REC.rst delete mode 100644 doc/api/next_api_changes/behavior/30272-ES.rst delete mode 100644 doc/api/next_api_changes/behavior/30318-ES.rst delete mode 100644 doc/api/next_api_changes/behavior/30335-ES.rst delete mode 100644 doc/api/next_api_changes/behavior/30532-TH.rst delete mode 100644 doc/api/next_api_changes/behavior/30634-AL.rst delete mode 100644 doc/api/next_api_changes/behavior/30824-AYS.rst delete mode 100644 doc/api/next_api_changes/behavior/30975-VM.rst delete mode 100644 doc/api/next_api_changes/behavior/31021-AYS.rst delete mode 100644 doc/api/next_api_changes/behavior/31148-ES.rst delete mode 100644 doc/api/next_api_changes/behavior/31223-AS.rst delete mode 100644 doc/api/next_api_changes/behavior/31486-ES.rst delete mode 100644 doc/api/next_api_changes/behavior/31530-TZ.rst delete mode 100644 doc/api/next_api_changes/behavior/31578-TH.rst create mode 100644 doc/api/prev_api_changes/api_changes_3.11.0/behaviour.rst diff --git a/doc/api/next_api_changes/behavior/28437-CH.rst b/doc/api/next_api_changes/behavior/28437-CH.rst deleted file mode 100644 index 9d0161b6aac9..000000000000 --- a/doc/api/next_api_changes/behavior/28437-CH.rst +++ /dev/null @@ -1,11 +0,0 @@ -*alpha* parameter handling on images -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -Prior to Matplotlib 3.10.1, when passing an array to ``imshow(..., alpha=...)``, the -parameter was silently ignored if the image data was an RGB or RGBA image or if -:rc:`image.interpolation_stage` resolved to "rbga". - -Matplotlib 3.10.1 changed this to apply the alpha array as the alpha channel, -overwriting any existing transparency information in the image data. Matplotlib v3.11.0 -further fixes the handling for RGBA images: the existing alpha channel is now multiplied -by the alpha array, consistent with how scalar alpha values are handled. diff --git a/doc/api/next_api_changes/behavior/29054-AL.rst b/doc/api/next_api_changes/behavior/29054-AL.rst deleted file mode 100644 index 3c65e9ae9b78..000000000000 --- a/doc/api/next_api_changes/behavior/29054-AL.rst +++ /dev/null @@ -1,11 +0,0 @@ -Minor log tick labels are set depending on number of major log ticks, not on number of decades spanned -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -Previously, by default, on a log-scaled axis, the minor ticks would be -unlabeled if the axis limits spanned more than one decade. The meaning of the -``minor_thresholds`` parameter to `.LogFormatter` has been altered so that the -decision of whether to label the minor ticks is now based on the number of -major ticks drawn within the axis limits. - -For example, for an axis spanning from 4 to 60 (with thus a single major log -tick, at 10), minor ticks are now labeled, even though the axis spans more than -one decade. diff --git a/doc/api/next_api_changes/behavior/29256_IMT.rst b/doc/api/next_api_changes/behavior/29256_IMT.rst deleted file mode 100644 index 57ec8f68d85c..000000000000 --- a/doc/api/next_api_changes/behavior/29256_IMT.rst +++ /dev/null @@ -1,6 +0,0 @@ -Setting titles of figures using webagg backend -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -Previously when using the ``webagg`` backend the title of a figure was set using -``figure.set_label``. Now it is set using ``figure.canvas.manager.set_window_title`` -which is more consistent with other backends. diff --git a/doc/api/next_api_changes/behavior/29827-ES.rst b/doc/api/next_api_changes/behavior/29827-ES.rst deleted file mode 100644 index d25dfa0c6574..000000000000 --- a/doc/api/next_api_changes/behavior/29827-ES.rst +++ /dev/null @@ -1,6 +0,0 @@ -``matplotlib.testing.check_figures_equal`` defaults to PNG only -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -In most cases, checking that figures are equal with `.check_figures_equal` does not -depend on the file format. Consequently, the *extensions* parameter now defaults to -``['png']`` instead of ``['png', 'pdf', 'svg']``, reducing default test requirements. diff --git a/doc/api/next_api_changes/behavior/29832-REC.rst b/doc/api/next_api_changes/behavior/29832-REC.rst deleted file mode 100644 index a23b043a823b..000000000000 --- a/doc/api/next_api_changes/behavior/29832-REC.rst +++ /dev/null @@ -1,11 +0,0 @@ -Mixing positional and keyword arguments for ``legend`` handles and labels... -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -... is no longer valid. If passing *handles* and *labels* to ``legend``, they must -now be passed either both positionally or both as keywords. - -Legend labels for ``plot`` -~~~~~~~~~~~~~~~~~~~~~~~~~~ -Previously if a sequence was passed to the *label* parameter of `~.Axes.plot` when -plotting a single dataset, the sequence was automatically cast to string for the legend -label. Now, if the sequence length is not one an error is raised. To keep the old -behavior, cast the sequence to string before passing. diff --git a/doc/api/next_api_changes/behavior/29958-TH.rst b/doc/api/next_api_changes/behavior/29958-TH.rst deleted file mode 100644 index cacaf2bac612..000000000000 --- a/doc/api/next_api_changes/behavior/29958-TH.rst +++ /dev/null @@ -1,8 +0,0 @@ -``Axes.add_collection(..., autolim=True)`` updates view limits -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -``Axes.add_collection(..., autolim=True)`` has so far only updated the data limits. -Users needed to additionally call `.Axes.autoscale_view` to update the view limits. -View limits are now updated as well if ``autolim=True``, using a lazy internal -update mechanism, so that the costs only apply once also if you add multiple -collections. diff --git a/doc/api/next_api_changes/behavior/30108-REC.rst b/doc/api/next_api_changes/behavior/30108-REC.rst deleted file mode 100644 index ce4fb0833207..000000000000 --- a/doc/api/next_api_changes/behavior/30108-REC.rst +++ /dev/null @@ -1,6 +0,0 @@ -Complex layouts and constrained layout -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -Constrained layout now produces smaller spacing between subplots in some -circumstances. This should only affect complex layouts where rows or columns -contain different numbers of subplots, for example a layout created with -``plt.subplot_mosaic('AC;BC', layout='constrained')``. diff --git a/doc/api/next_api_changes/behavior/30272-ES.rst b/doc/api/next_api_changes/behavior/30272-ES.rst deleted file mode 100644 index 5a03f9bc7972..000000000000 --- a/doc/api/next_api_changes/behavior/30272-ES.rst +++ /dev/null @@ -1,2 +0,0 @@ -``font_manager.findfont`` logs if selected font weight does not match requested -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/doc/api/next_api_changes/behavior/30318-ES.rst b/doc/api/next_api_changes/behavior/30318-ES.rst deleted file mode 100644 index 805901dcb21d..000000000000 --- a/doc/api/next_api_changes/behavior/30318-ES.rst +++ /dev/null @@ -1,9 +0,0 @@ -FT2Font no longer sets a default size -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -In the interest of handling non-scalable fonts and reducing font initialization, the -`.FT2Font` constructor no longer sets a default size. Non-scalable fonts are sometimes -used for bitmap-backed emoji fonts. - -If metrics are important (i.e., if you are loading character glyphs, or setting a text -string), then explicitly call `.FT2Font.set_size` beforehand. diff --git a/doc/api/next_api_changes/behavior/30335-ES.rst b/doc/api/next_api_changes/behavior/30335-ES.rst deleted file mode 100644 index 26b059401e19..000000000000 --- a/doc/api/next_api_changes/behavior/30335-ES.rst +++ /dev/null @@ -1,15 +0,0 @@ -``mathtext.VectorParse`` now includes glyph indices -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -For a *path*-outputting `.MathTextParser`, in the return value of -`~.MathTextParser.parse`, (a `.VectorParse`), the *glyphs* field is now a list -containing tuples of: - -- font: `.FT2Font` -- fontsize: `float` -- character code: `int` -- glyph index: `int` -- x: `float` -- y: `float` - -Specifically, the glyph index was added after the character code. diff --git a/doc/api/next_api_changes/behavior/30532-TH.rst b/doc/api/next_api_changes/behavior/30532-TH.rst deleted file mode 100644 index 3d368c566039..000000000000 --- a/doc/api/next_api_changes/behavior/30532-TH.rst +++ /dev/null @@ -1,4 +0,0 @@ -Default name of ``ListedColormap`` -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -The default name of `.ListedColormap` has changed from "from_list" to "unnamed". diff --git a/doc/api/next_api_changes/behavior/30634-AL.rst b/doc/api/next_api_changes/behavior/30634-AL.rst deleted file mode 100644 index 585de1ea14eb..000000000000 --- a/doc/api/next_api_changes/behavior/30634-AL.rst +++ /dev/null @@ -1,6 +0,0 @@ -hist2d no longer forces axes limits -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -Previously, `.Axes.hist2d` would force the axes x and y limits to the extents -of the histogrammed data, ignoring any other artists. `.Axes.hist2d` now -behaves similarly to `.Axes.imshow`: axes limits are updated to fit the data, -but autoscaling is not otherwise disabled. diff --git a/doc/api/next_api_changes/behavior/30824-AYS.rst b/doc/api/next_api_changes/behavior/30824-AYS.rst deleted file mode 100644 index a190bd537126..000000000000 --- a/doc/api/next_api_changes/behavior/30824-AYS.rst +++ /dev/null @@ -1,6 +0,0 @@ -Bivariate colormaps now fully span the intended range of colors -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -Bivariate colormaps generated by ``SegmentedBivarColormap`` (e.g., ``BiOrangeBlue``) -from a set of input colors now fully span that range of colors. There had been a bug -with the numerical interpolation such that the colormap did not actually include the -first or last colors. diff --git a/doc/api/next_api_changes/behavior/30975-VM.rst b/doc/api/next_api_changes/behavior/30975-VM.rst deleted file mode 100644 index 185b57ac5de6..000000000000 --- a/doc/api/next_api_changes/behavior/30975-VM.rst +++ /dev/null @@ -1,9 +0,0 @@ -Windows configuration directory location -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -On Windows, the default configuration and cache directories now use -``%LOCALAPPDATA%\matplotlib`` instead of ``%USERPROFILE%\.matplotlib``. -This follows Windows application data storage conventions. - -The ``MPLCONFIGDIR`` environment variable can still be used to override -this default. diff --git a/doc/api/next_api_changes/behavior/31021-AYS.rst b/doc/api/next_api_changes/behavior/31021-AYS.rst deleted file mode 100644 index aa5dc598cb26..000000000000 --- a/doc/api/next_api_changes/behavior/31021-AYS.rst +++ /dev/null @@ -1,7 +0,0 @@ -Rendering of images now more accurate -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -There have been several fixes to improve the accuracy of how images are -resampled and placed during rendering. Some inaccuracies were up to a pixel off -in the output. The most apparent improvement is that the alignment of data -pixels with tick marks and grid lines is now reliable. Nearly all image output -has changed, but often only at a subtle level that is not obvious qualitatively. diff --git a/doc/api/next_api_changes/behavior/31148-ES.rst b/doc/api/next_api_changes/behavior/31148-ES.rst deleted file mode 100644 index 08ad9b7cb0c1..000000000000 --- a/doc/api/next_api_changes/behavior/31148-ES.rst +++ /dev/null @@ -1,6 +0,0 @@ -Default *style* parameter of ``image_comparison`` -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -The *style* parameter of the `.image_comparison` decorator will become 'mpl20' in -Matplotlib 3.13. Not passing it and relying on the previous default will warn until the -change occurs. diff --git a/doc/api/next_api_changes/behavior/31223-AS.rst b/doc/api/next_api_changes/behavior/31223-AS.rst deleted file mode 100644 index 0880659e55ee..000000000000 --- a/doc/api/next_api_changes/behavior/31223-AS.rst +++ /dev/null @@ -1,28 +0,0 @@ -``pyplot.subplot`` and ``pyplot.subplot_mosaic`` raise *ValueError* on existing figures ----------------------------------------------------------------------------------------- - -Passing a *num* argument to `~.pyplot.subplots` or `~.pyplot.subplot_mosaic` -that refers to an existing figure or is a ``Figure`` instance now raises a -`ValueError`. - -These utility functions are intended strictly for the creation of new figures and -subplots. Previously, they accidentally allowed the reuse of existing figures because -they internally called `~.pyplot.figure`. This change ensures that these functions -strictly follow their documented purpose of creating new figures. - -To reuse an existing figure, clear it first using ``clear=True``: - -.. code-block:: python - - fig, axs = plt.subplots(num=1, clear=True) - # or - fig, axd = plt.subplot_mosaic([['A', 'B']], num=1, clear=True) - -If you have a ``Figure`` instance and want to add subplots to it, use the -object-oriented API: - -.. code-block:: python - - fig.subplots(nrows=2, ncols=2) - # or - fig.subplot_mosaic([['A', 'B']]) diff --git a/doc/api/next_api_changes/behavior/31486-ES.rst b/doc/api/next_api_changes/behavior/31486-ES.rst deleted file mode 100644 index a04c1d025d90..000000000000 --- a/doc/api/next_api_changes/behavior/31486-ES.rst +++ /dev/null @@ -1,6 +0,0 @@ -New environment variable to ignore system fonts -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -System fonts may be ignored by setting the :envvar:`MPL_IGNORE_SYSTEM_FONTS`; this -suppresses searching for system fonts (in known directories or via some -platform-specific subprocess) as well as limiting the results from `.FontManager.findfont`. diff --git a/doc/api/next_api_changes/behavior/31530-TZ.rst b/doc/api/next_api_changes/behavior/31530-TZ.rst deleted file mode 100644 index 470104817a59..000000000000 --- a/doc/api/next_api_changes/behavior/31530-TZ.rst +++ /dev/null @@ -1,6 +0,0 @@ -``relim()`` now accounts for Collection artists -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -Previously, `~.axes.Axes.relim` did not recalculate data limits for -`.Collection` artists (e.g. those created by `~.axes.Axes.scatter`). -Calling ``ax.relim()`` followed by ``ax.autoscale_view()`` now correctly -includes scatter plots and other collections in the axes limits. diff --git a/doc/api/next_api_changes/behavior/31578-TH.rst b/doc/api/next_api_changes/behavior/31578-TH.rst deleted file mode 100644 index 0607652c7c8f..000000000000 --- a/doc/api/next_api_changes/behavior/31578-TH.rst +++ /dev/null @@ -1,10 +0,0 @@ -SVG links open in new tab or window -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -`.Artist.set_url` allows to turn the Artist into a link. In SVG output, -this has been implemented without specifying a `target`_ attribute. The default -target value "_self" resulted in replacing the SVG document with the linked page -when the link was clicked. - -The target is now set to "_blank" so that the link opens in a new tab or window. - -.. _target: https://developer.mozilla.org/en-US/docs/Web/SVG/Reference/Attribute/target diff --git a/doc/api/prev_api_changes/api_changes_3.11.0.rst b/doc/api/prev_api_changes/api_changes_3.11.0.rst index 5d9dd7ad50ba..1dbaeda7e796 100644 --- a/doc/api/prev_api_changes/api_changes_3.11.0.rst +++ b/doc/api/prev_api_changes/api_changes_3.11.0.rst @@ -5,6 +5,8 @@ API Changes for 3.11.0 :local: :depth: 1 +.. include:: /api/prev_api_changes/api_changes_3.10.0/behavior.rst + .. include:: /api/prev_api_changes/api_changes_3.10.0/removals.rst .. include:: /api/prev_api_changes/api_changes_3.10.0/development.rst diff --git a/doc/api/prev_api_changes/api_changes_3.11.0/behaviour.rst b/doc/api/prev_api_changes/api_changes_3.11.0/behaviour.rst new file mode 100644 index 000000000000..c592cad7ebdd --- /dev/null +++ b/doc/api/prev_api_changes/api_changes_3.11.0/behaviour.rst @@ -0,0 +1,199 @@ +``pyplot.subplot`` and ``pyplot.subplot_mosaic`` raise *ValueError* on existing figures +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Passing a *num* argument to `~.pyplot.subplots` or `~.pyplot.subplot_mosaic` that refers +to an existing figure or is a ``Figure`` instance now raises a `ValueError`. + +These utility functions are intended strictly for the creation of new figures and +subplots. Previously, they accidentally allowed the reuse of existing figures because +they internally called `~.pyplot.figure`. This change ensures that these functions +strictly follow their documented purpose of creating new figures. + +To reuse an existing figure, clear it first using ``clear=True``: + +.. code-block:: python + + fig, axs = plt.subplots(num=1, clear=True) + # or + fig, axd = plt.subplot_mosaic([['A', 'B']], num=1, clear=True) + +If you have a ``Figure`` instance and want to add subplots to it, use the +object-oriented API: + +.. code-block:: python + + fig.subplots(nrows=2, ncols=2) + # or + fig.subplot_mosaic([['A', 'B']]) + +Complex layouts and constrained layout +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Constrained layout now produces smaller spacing between subplots in some circumstances. +This should only affect complex layouts where rows or columns contain different numbers +of subplots, for example a layout created with ``plt.subplot_mosaic('AC;BC', +layout='constrained')``. + +Bivariate colormaps now fully span the intended range of colors +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Bivariate colormaps generated by ``SegmentedBivarColormap`` (e.g., ``BiOrangeBlue``) +from a set of input colors now fully span that range of colors. There had been a bug +with the numerical interpolation such that the colormap did not actually include the +first or last colors. + +Rendering of images now more accurate +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +There have been several fixes to improve the accuracy of how images are resampled and +placed during rendering. Some inaccuracies were up to a pixel off in the output. The +most apparent improvement is that the alignment of data pixels with tick marks and grid +lines is now reliable. Nearly all image output has changed, but often only at a subtle +level that is not obvious qualitatively. + +*alpha* parameter handling on images +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Prior to Matplotlib 3.10.1, when passing an array to ``imshow(..., alpha=...)``, the +parameter was silently ignored if the image data was an RGB or RGBA image or if +:rc:`image.interpolation_stage` resolved to "rbga". + +Matplotlib 3.10.1 changed this to apply the alpha array as the alpha channel, +overwriting any existing transparency information in the image data. Matplotlib 3.11.0 +further fixes the handling for RGBA images: the existing alpha channel is now multiplied +by the alpha array, consistent with how scalar alpha values are handled. + +Legend labels for ``plot`` +~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Previously if a sequence was passed to the *label* parameter of `~.Axes.plot` when +plotting a single dataset, the sequence was automatically cast to string for the legend +label. Now, if the sequence length is not one an error is raised. To keep the old +behavior, cast the sequence to string before passing. + +Mixing positional and keyword arguments for ``legend`` handles and labels... +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +... is no longer valid. If passing *handles* and *labels* to ``legend``, they must now +be passed either both positionally or both as keyword arguments. + +``Axes.add_collection(..., autolim=True)`` updates view limits +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +``Axes.add_collection(..., autolim=True)`` has so far only updated the data limits, and +calling `.Axes.autoscale_view` was also necessary to update the view limits. View limits +are now updated as well if ``autolim=True``, using a lazy internal update mechanism, so +that the costs only apply once also if you add multiple collections. + +``relim()`` now accounts for Collection artists +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Previously, `~.axes.Axes.relim` did not recalculate data limits for `.Collection` +artists (e.g. those created by `~.axes.Axes.scatter`). Calling ``ax.relim()`` followed +by ``ax.autoscale_view()`` now correctly includes scatter plots and other collections in +the axes limits. + +hist2d no longer forces axes limits +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Previously, `.Axes.hist2d` would force the axes x and y limits to the extents of the +histogrammed data, ignoring any other artists. `.Axes.hist2d` now behaves similarly to +`.Axes.imshow`: axes limits are updated to fit the data, but autoscaling is not +otherwise disabled. + +Minor log tick labels are set by number of major log ticks, not number of decades spanned +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Previously, by default, on a log-scaled axis, the minor ticks would be unlabeled if the +axis limits spanned more than one decade. The meaning of the *minor_thresholds* +parameter to `.LogFormatter` has been altered so that the decision of whether to label +the minor ticks is now based on the number of major ticks drawn within the axis limits. + +For example, for an axis spanning from 4 to 60 (with thus a single major log tick, at +10), minor ticks are now labeled, even though the axis spans more than one decade. + +Setting titles of figures using webagg backend +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Previously when using the ``webagg`` backend the title of a figure was set using +``figure.set_label``. Now it is set using ``figure.canvas.manager.set_window_title`` +which is more consistent with other backends. + +Default name of ``ListedColormap`` +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +The default name of `.ListedColormap` has changed from "from_list" to "unnamed". + +``font_manager.findfont`` logs if selected font weight does not match requested +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +When searching for a font with a weight specified, if the best-matched font differs in +weight, then a warning will be logged. + +FT2Font no longer sets a default size +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +In the interest of handling non-scalable fonts and reducing font initialization, the +`.FT2Font` constructor no longer sets a default size. Non-scalable fonts are sometimes +used for bitmap-backed emoji fonts. + +If metrics are important (i.e., if you are loading character glyphs, or setting a text +string), then explicitly call `.FT2Font.set_size` beforehand. + +``mathtext.VectorParse`` now includes glyph indices +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +For a *path*-outputting `.MathTextParser`, in the return value of +`~.MathTextParser.parse`, (a `.VectorParse`), the *glyphs* field is now a list +containing tuples of: + +- font: `.FT2Font` +- fontsize: `float` +- character code: `int` +- glyph index: `int` +- x: `float` +- y: `float` + +Specifically, the glyph index was added after the character code. + +New environment variable to ignore system fonts +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +System fonts may be ignored by setting the :envvar:`MPL_IGNORE_SYSTEM_FONTS`; this +suppresses searching for system fonts (in known directories or via some +platform-specific subprocess) as well as limiting the results from +`.FontManager.findfont`. + +SVG links open in new tab or window +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +`.Artist.set_url` allows to turn the Artist into a link. In SVG output, this has been +implemented without specifying a `target`_ attribute. The default target value "_self" +resulted in replacing the SVG document with the linked page when the link was clicked. + +The target is now set to "_blank" so that the link opens in a new tab or window. + +.. _target: https://developer.mozilla.org/en-US/docs/Web/SVG/Reference/Attribute/target + +``matplotlib.testing.check_figures_equal`` defaults to PNG only +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +In most cases, checking that figures are equal with `.check_figures_equal` does not +depend on the file format. Consequently, the *extensions* parameter now defaults to +``['png']`` instead of ``['png', 'pdf', 'svg']``, reducing default test requirements. + +Default *style* parameter of ``image_comparison`` +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +The *style* parameter of the `.image_comparison` decorator will become 'mpl20' in +Matplotlib 3.13. Not passing it and relying on the previous default will warn until the +change occurs. + +Windows configuration directory location +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +On Windows, the default configuration and cache directories now use +``%LOCALAPPDATA%\matplotlib`` instead of ``%USERPROFILE%\.matplotlib``. This follows +Windows application data storage conventions. + +The ``MPLCONFIGDIR`` environment variable can still be used to override this default. From ddc0c52fc647f59eccd81b95ecb5a0dd784d295d Mon Sep 17 00:00:00 2001 From: Elliott Sales de Andrade Date: Sat, 9 May 2026 03:04:04 -0400 Subject: [PATCH 4/4] DOC: Coalesce API deprecations for 3.11 --- .../deprecations/27551-AL.rst | 4 - .../deprecations/27972-AL.rst | 8 - .../deprecations/27998-TS.rst | 7 - .../deprecations/28074-TS.rst | 9 - .../deprecations/29135-TH.rst | 5 - .../deprecations/29358-TH.rst | 17 -- .../deprecations/29529-TH.rst | 7 - .../deprecations/29817-AL.rst | 7 - .../deprecations/29993-AL.rst | 4 - .../deprecations/30027-AL.rst | 3 - .../deprecations/30044-AL.rst | 12 - .../deprecations/30070-OG.rst | 4 - .../deprecations/30088-AL.rst | 4 - .../deprecations/30163-AL.rst | 9 - .../deprecations/30322-ES.rst | 7 - .../deprecations/30329-ES.rst | 4 - .../deprecations/30349-AL.rst | 3 - .../deprecations/30364-AS.rst | 4 - .../deprecations/30368-AL.rst | 3 - .../deprecations/30369-AL.rst | 14 - .../deprecations/30469-AL.rst | 4 - .../deprecations/30512-ES.rst | 3 - .../deprecations/30531-TH.rst | 16 - .../deprecations/30737-TH.rst | 8 - .../deprecations/30844-IHI.rst | 6 - .../deprecations/30889-TH.rst | 10 - .../deprecations/30993-SS.rst | 5 - .../deprecations/31023-AL.rst | 4 - .../deprecations/31143-AL.rst | 3 - .../deprecations/31170-AL.rst | 6 - .../deprecations/31248-SS.rst | 9 - .../deprecations/31347-TH.rst | 8 - .../deprecations/31416-TH.rst | 8 - .../deprecations/31468-ES.rst | 6 - .../deprecations/31521-ES.rst | 7 - .../deprecations/31630-ES.rst | 10 - .../prev_api_changes/api_changes_3.11.0.rst | 2 + .../api_changes_3.11.0/deprecations.rst | 289 ++++++++++++++++++ 38 files changed, 291 insertions(+), 248 deletions(-) delete mode 100644 doc/api/next_api_changes/deprecations/27551-AL.rst delete mode 100644 doc/api/next_api_changes/deprecations/27972-AL.rst delete mode 100644 doc/api/next_api_changes/deprecations/27998-TS.rst delete mode 100644 doc/api/next_api_changes/deprecations/28074-TS.rst delete mode 100644 doc/api/next_api_changes/deprecations/29135-TH.rst delete mode 100644 doc/api/next_api_changes/deprecations/29358-TH.rst delete mode 100644 doc/api/next_api_changes/deprecations/29529-TH.rst delete mode 100644 doc/api/next_api_changes/deprecations/29817-AL.rst delete mode 100644 doc/api/next_api_changes/deprecations/29993-AL.rst delete mode 100644 doc/api/next_api_changes/deprecations/30027-AL.rst delete mode 100644 doc/api/next_api_changes/deprecations/30044-AL.rst delete mode 100644 doc/api/next_api_changes/deprecations/30070-OG.rst delete mode 100644 doc/api/next_api_changes/deprecations/30088-AL.rst delete mode 100644 doc/api/next_api_changes/deprecations/30163-AL.rst delete mode 100644 doc/api/next_api_changes/deprecations/30322-ES.rst delete mode 100644 doc/api/next_api_changes/deprecations/30329-ES.rst delete mode 100644 doc/api/next_api_changes/deprecations/30349-AL.rst delete mode 100644 doc/api/next_api_changes/deprecations/30364-AS.rst delete mode 100644 doc/api/next_api_changes/deprecations/30368-AL.rst delete mode 100644 doc/api/next_api_changes/deprecations/30369-AL.rst delete mode 100644 doc/api/next_api_changes/deprecations/30469-AL.rst delete mode 100644 doc/api/next_api_changes/deprecations/30512-ES.rst delete mode 100644 doc/api/next_api_changes/deprecations/30531-TH.rst delete mode 100644 doc/api/next_api_changes/deprecations/30737-TH.rst delete mode 100644 doc/api/next_api_changes/deprecations/30844-IHI.rst delete mode 100644 doc/api/next_api_changes/deprecations/30889-TH.rst delete mode 100644 doc/api/next_api_changes/deprecations/30993-SS.rst delete mode 100644 doc/api/next_api_changes/deprecations/31023-AL.rst delete mode 100644 doc/api/next_api_changes/deprecations/31143-AL.rst delete mode 100644 doc/api/next_api_changes/deprecations/31170-AL.rst delete mode 100644 doc/api/next_api_changes/deprecations/31248-SS.rst delete mode 100644 doc/api/next_api_changes/deprecations/31347-TH.rst delete mode 100644 doc/api/next_api_changes/deprecations/31416-TH.rst delete mode 100644 doc/api/next_api_changes/deprecations/31468-ES.rst delete mode 100644 doc/api/next_api_changes/deprecations/31521-ES.rst delete mode 100644 doc/api/next_api_changes/deprecations/31630-ES.rst create mode 100644 doc/api/prev_api_changes/api_changes_3.11.0/deprecations.rst diff --git a/doc/api/next_api_changes/deprecations/27551-AL.rst b/doc/api/next_api_changes/deprecations/27551-AL.rst deleted file mode 100644 index 4811f542bd5f..000000000000 --- a/doc/api/next_api_changes/deprecations/27551-AL.rst +++ /dev/null @@ -1,4 +0,0 @@ -``GridFinder.transform_xy`` and ``GridFinder.inv_transform_xy`` -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -... are deprecated. Directly use the standard transform returned by -`.GridFinder.get_transform` instead. diff --git a/doc/api/next_api_changes/deprecations/27972-AL.rst b/doc/api/next_api_changes/deprecations/27972-AL.rst deleted file mode 100644 index cf14b24345b5..000000000000 --- a/doc/api/next_api_changes/deprecations/27972-AL.rst +++ /dev/null @@ -1,8 +0,0 @@ -``axes_grid.Grid.ngrids`` -~~~~~~~~~~~~~~~~~~~~~~~~~ -This attribute has been deprecated and renamed ``n_axes``, consistently with -the new name of the `~.axes_grid.Grid` constructor parameter that allows -setting the actual number of axes in the grid (the old parameter, ``ngrids``, -did not actually work since Matplotlib 3.3). - -The same change has been made in ``axes_grid.ImageGrid``. diff --git a/doc/api/next_api_changes/deprecations/27998-TS.rst b/doc/api/next_api_changes/deprecations/27998-TS.rst deleted file mode 100644 index ab69b87f0989..000000000000 --- a/doc/api/next_api_changes/deprecations/27998-TS.rst +++ /dev/null @@ -1,7 +0,0 @@ -``violinplot`` and ``violin`` *vert* parameter -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -The parameter *vert: bool* has been deprecated on `~.Axes.violinplot` and -`~.Axes.violin`. -It will be replaced by *orientation: {"vertical", "horizontal"}* for API -consistency. diff --git a/doc/api/next_api_changes/deprecations/28074-TS.rst b/doc/api/next_api_changes/deprecations/28074-TS.rst deleted file mode 100644 index 6a8b5d4b21b8..000000000000 --- a/doc/api/next_api_changes/deprecations/28074-TS.rst +++ /dev/null @@ -1,9 +0,0 @@ -``boxplot`` and ``bxp`` *vert* parameter, and ``rcParams["boxplot.vertical"]`` -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -The parameter *vert: bool* has been deprecated on `~.Axes.boxplot` and -`~.Axes.bxp`. It is replaced by *orientation: {"vertical", "horizontal"}* -for API consistency. - -``rcParams["boxplot.vertical"]``, which controlled the orientation of ``boxplot``, -is deprecated without replacement. diff --git a/doc/api/next_api_changes/deprecations/29135-TH.rst b/doc/api/next_api_changes/deprecations/29135-TH.rst deleted file mode 100644 index e2289a248076..000000000000 --- a/doc/api/next_api_changes/deprecations/29135-TH.rst +++ /dev/null @@ -1,5 +0,0 @@ -Parameter ``ListedColormap(..., N=...)`` -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -Passing the parameter *N* to `.ListedColormap` is deprecated. -Please preprocess the list colors yourself if needed. diff --git a/doc/api/next_api_changes/deprecations/29358-TH.rst b/doc/api/next_api_changes/deprecations/29358-TH.rst deleted file mode 100644 index 1b7a50456afc..000000000000 --- a/doc/api/next_api_changes/deprecations/29358-TH.rst +++ /dev/null @@ -1,17 +0,0 @@ -3rd party scales do not need to have an *axis* parameter anymore -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -Since matplotlib 3.1 `PR 12831 `_ -scale objects should be reusable and therefore independent of any particular Axis. -Therefore, the use of the *axis* parameter in the ``__init__`` had been discouraged. -However, having that parameter in the signature was still necessary for API -backwards-compatibility. This is no longer the case. - -`.register_scale` now accepts scale classes with or without this parameter. - -The *axis* parameter is pending-deprecated. It will be deprecated in matplotlib 3.13, -and removed in matplotlib 3.15. - -3rd-party scales are recommended to remove the *axis* parameter now if they can -afford to restrict compatibility to matplotlib >= 3.11 already. Otherwise, they may -keep the *axis* parameter and remove it in time for matplotlib 3.13. diff --git a/doc/api/next_api_changes/deprecations/29529-TH.rst b/doc/api/next_api_changes/deprecations/29529-TH.rst deleted file mode 100644 index e396e68c4aa1..000000000000 --- a/doc/api/next_api_changes/deprecations/29529-TH.rst +++ /dev/null @@ -1,7 +0,0 @@ -Capitalization of None in matplotlibrc -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -In :file:`matplotlibrc` config files every capitalization of None was -accepted for denoting the Python constant `None`. This is deprecated. The -only accepted capitalization is now None, i.e. starting with a capital letter -and all other letters in lowercase. diff --git a/doc/api/next_api_changes/deprecations/29817-AL.rst b/doc/api/next_api_changes/deprecations/29817-AL.rst deleted file mode 100644 index f3b339ed7c10..000000000000 --- a/doc/api/next_api_changes/deprecations/29817-AL.rst +++ /dev/null @@ -1,7 +0,0 @@ -``DviFont.widths`` -~~~~~~~~~~~~~~~~~~ -... is deprecated with no replacement. - -Direct access to ``Tfm``'s ``widths``, ``heights``, ``depths`` dicts -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -... is deprecated; access a glyph's metrics with `.Tfm.get_metrics` instead. diff --git a/doc/api/next_api_changes/deprecations/29993-AL.rst b/doc/api/next_api_changes/deprecations/29993-AL.rst deleted file mode 100644 index 9104fd669325..000000000000 --- a/doc/api/next_api_changes/deprecations/29993-AL.rst +++ /dev/null @@ -1,4 +0,0 @@ -``testing.widgets.mock_event`` and ``testing.widgets.do_event`` -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -... are deprecated. Directly construct Event objects (typically `.MouseEvent` -or `.KeyEvent`) and pass them to ``canvas.callbacks.process()`` instead. diff --git a/doc/api/next_api_changes/deprecations/30027-AL.rst b/doc/api/next_api_changes/deprecations/30027-AL.rst deleted file mode 100644 index ed65d9391371..000000000000 --- a/doc/api/next_api_changes/deprecations/30027-AL.rst +++ /dev/null @@ -1,3 +0,0 @@ -``PdfFile.fontNames``, ``PdfFile.dviFontInfo``, ``PdfFile.type1Descriptors`` -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -... are deprecated with no replacement. diff --git a/doc/api/next_api_changes/deprecations/30044-AL.rst b/doc/api/next_api_changes/deprecations/30044-AL.rst deleted file mode 100644 index e004d5f2730f..000000000000 --- a/doc/api/next_api_changes/deprecations/30044-AL.rst +++ /dev/null @@ -1,12 +0,0 @@ -``FT2Image`` -~~~~~~~~~~~~ -... is deprecated. Use 2D uint8 ndarrays instead. In particular: - -- The ``FT2Image`` constructor took ``width, height`` as separate parameters - but the ndarray constructor takes ``(height, width)`` as single tuple - parameter. -- `.FT2Font.draw_glyph_to_bitmap` now (also) takes 2D uint8 arrays as input. -- ``FT2Image.draw_rect_filled`` should be replaced by directly setting pixel - values to black. -- The ``image`` attribute of the object returned by ``MathTextParser("agg").parse`` - is now a 2D uint8 array. diff --git a/doc/api/next_api_changes/deprecations/30070-OG.rst b/doc/api/next_api_changes/deprecations/30070-OG.rst deleted file mode 100644 index 98786bcfa1d2..000000000000 --- a/doc/api/next_api_changes/deprecations/30070-OG.rst +++ /dev/null @@ -1,4 +0,0 @@ -``BezierSegment.point_at_t`` -~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -... is deprecated. Instead, it is possible to call the BezierSegment with an argument. diff --git a/doc/api/next_api_changes/deprecations/30088-AL.rst b/doc/api/next_api_changes/deprecations/30088-AL.rst deleted file mode 100644 index ae1338da7f85..000000000000 --- a/doc/api/next_api_changes/deprecations/30088-AL.rst +++ /dev/null @@ -1,4 +0,0 @@ -*fontfile* parameter of ``PdfFile.createType1Descriptor`` -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -This parameter is deprecated; all relevant pieces of information are now -directly extracted from the *t1font* argument. diff --git a/doc/api/next_api_changes/deprecations/30163-AL.rst b/doc/api/next_api_changes/deprecations/30163-AL.rst deleted file mode 100644 index 15d0077375f2..000000000000 --- a/doc/api/next_api_changes/deprecations/30163-AL.rst +++ /dev/null @@ -1,9 +0,0 @@ -``matplotlib.style.core`` -~~~~~~~~~~~~~~~~~~~~~~~~~ -The ``matplotlib.style.core`` module is deprecated. All APIs intended for -public use are now available in `matplotlib.style` directly (including -``USER_LIBRARY_PATHS``, which was previously not reexported). - -The following APIs of ``matplotlib.style.core`` have been deprecated with no -replacement: ``BASE_LIBRARY_PATH``, ``STYLE_EXTENSION``, ``STYLE_BLACKLIST``, -``update_user_library``, ``read_style_directory``, ``update_nested_dict``. diff --git a/doc/api/next_api_changes/deprecations/30322-ES.rst b/doc/api/next_api_changes/deprecations/30322-ES.rst deleted file mode 100644 index b9c4964e58c8..000000000000 --- a/doc/api/next_api_changes/deprecations/30322-ES.rst +++ /dev/null @@ -1,7 +0,0 @@ -Font kerning factor is deprecated -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -Due to internal changes to support complex text rendering, the kerning factor on fonts is -no longer used. Setting the ``text.kerning_factor`` rcParam (which existed only for -backwards-compatibility) to any value other than None is deprecated, and the rcParam will -be removed in the future. diff --git a/doc/api/next_api_changes/deprecations/30329-ES.rst b/doc/api/next_api_changes/deprecations/30329-ES.rst deleted file mode 100644 index 8d5060c4821b..000000000000 --- a/doc/api/next_api_changes/deprecations/30329-ES.rst +++ /dev/null @@ -1,4 +0,0 @@ -``font_manager.is_opentype_cff_font`` is deprecated -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -There is no replacement. diff --git a/doc/api/next_api_changes/deprecations/30349-AL.rst b/doc/api/next_api_changes/deprecations/30349-AL.rst deleted file mode 100644 index 78e26f41889f..000000000000 --- a/doc/api/next_api_changes/deprecations/30349-AL.rst +++ /dev/null @@ -1,3 +0,0 @@ -``Axes.set_navigate_mode`` is deprecated -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -... with no replacement. diff --git a/doc/api/next_api_changes/deprecations/30364-AS.rst b/doc/api/next_api_changes/deprecations/30364-AS.rst deleted file mode 100644 index 4f5493b8b706..000000000000 --- a/doc/api/next_api_changes/deprecations/30364-AS.rst +++ /dev/null @@ -1,4 +0,0 @@ -Parameters ``Axes3D.set_aspect(..., anchor=..., share=...)`` -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -The parameters *anchor* and *share* of `.Axes3D.set_aspect` are deprecated. -They had no effect on 3D axes and will be removed in a future version. diff --git a/doc/api/next_api_changes/deprecations/30368-AL.rst b/doc/api/next_api_changes/deprecations/30368-AL.rst deleted file mode 100644 index efd3c8360ef3..000000000000 --- a/doc/api/next_api_changes/deprecations/30368-AL.rst +++ /dev/null @@ -1,3 +0,0 @@ -``GridFinder.get_grid_info`` now takes a single bbox as parameter -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -Passing ``x1, y1, x2, y2`` as separate parameters is deprecated. diff --git a/doc/api/next_api_changes/deprecations/30369-AL.rst b/doc/api/next_api_changes/deprecations/30369-AL.rst deleted file mode 100644 index 8b82c80054d9..000000000000 --- a/doc/api/next_api_changes/deprecations/30369-AL.rst +++ /dev/null @@ -1,14 +0,0 @@ -:mod:`.axisartist` now uses more standard tick direction controls -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -Previously, the position of :mod:`.axisartist` ticks (inside or outside -the axes) were set using ``set_tick_out(bool)``. They are now set -using ``set_tick_direction("in")`` (or "out", or "inout"), and respect -:rc:`xtick.direction` and :rc:`ytick.direction`. In particular, they default -to pointing outwards, consistently with the rest of the library. - -The *tick_out* parameter of `.Ticks` has been deprecated (use *tick_direction* -instead). The ``Ticks.get_tick_out`` method is deprecated (use -`.Ticks.get_tick_direction` instead). - -The unused ``locs_angles_labels`` attribute of `.Ticks` and `.LabelBase` has -also been deprecated. diff --git a/doc/api/next_api_changes/deprecations/30469-AL.rst b/doc/api/next_api_changes/deprecations/30469-AL.rst deleted file mode 100644 index ef3f042843c2..000000000000 --- a/doc/api/next_api_changes/deprecations/30469-AL.rst +++ /dev/null @@ -1,4 +0,0 @@ -The *axes* parameter of ``RadialLocator`` -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -... is deprecated. `~.polar.RadialLocator` now fetches the relevant information -from the Axis' parent Axes. diff --git a/doc/api/next_api_changes/deprecations/30512-ES.rst b/doc/api/next_api_changes/deprecations/30512-ES.rst deleted file mode 100644 index f235964c5502..000000000000 --- a/doc/api/next_api_changes/deprecations/30512-ES.rst +++ /dev/null @@ -1,3 +0,0 @@ -``PdfFile.multi_byte_charprocs`` -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -... is deprecated with no replacement. diff --git a/doc/api/next_api_changes/deprecations/30531-TH.rst b/doc/api/next_api_changes/deprecations/30531-TH.rst deleted file mode 100644 index 19d51fd2fb6c..000000000000 --- a/doc/api/next_api_changes/deprecations/30531-TH.rst +++ /dev/null @@ -1,16 +0,0 @@ -In-place modifications of colormaps -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -Colormaps are planned to become immutable in the long term. - -As a first step, in-place modifications of colormaps are now pending-deprecated. -This affects the following methods of `.Colormap`: - -- `.Colormap.set_bad` - use ``cmap.with_extremes(bad=...)`` instead -- `.Colormap.set_under` - use ``cmap.with_extremes(under=...)`` instead -- `.Colormap.set_over` - use ``cmap.with_extremes(over=...)`` instead -- `.Colormap.set_extremes` - use ``cmap.with_extremes(...)`` instead - -Use the respective `.Colormap.with_extremes` and appropriate keyword arguments -instead which returns a copy of the colormap (available since matplotlib 3.4). -Alternatively, if you create the colormap yourself, you can also pass the -respective arguments to the constructor (available since matplotlib 3.11). diff --git a/doc/api/next_api_changes/deprecations/30737-TH.rst b/doc/api/next_api_changes/deprecations/30737-TH.rst deleted file mode 100644 index 8feef85912b4..000000000000 --- a/doc/api/next_api_changes/deprecations/30737-TH.rst +++ /dev/null @@ -1,8 +0,0 @@ -The *canvas* parameter to ``MultiCursor`` -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -... is deprecated. It has been unused for a while already. - -Please remove the parameter and change the call from -``MultiCursor(canvas, axes)`` to ``MultiCursor(axes)``. Both calls are -valid throughout the deprecation period. diff --git a/doc/api/next_api_changes/deprecations/30844-IHI.rst b/doc/api/next_api_changes/deprecations/30844-IHI.rst deleted file mode 100644 index 55ebe9af6d68..000000000000 --- a/doc/api/next_api_changes/deprecations/30844-IHI.rst +++ /dev/null @@ -1,6 +0,0 @@ -``CallbackRegistry.disconnect`` *cid* parameter renamed to *cid_or_func* -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -The *cid* parameter of `.CallbackRegistry.disconnect` has been renamed to -*cid_or_func*. The method now also accepts a callable, which will disconnect -that callback from all signals or from a specific signal if the *signal* -keyword argument is provided. diff --git a/doc/api/next_api_changes/deprecations/30889-TH.rst b/doc/api/next_api_changes/deprecations/30889-TH.rst deleted file mode 100644 index d221ae30d4fb..000000000000 --- a/doc/api/next_api_changes/deprecations/30889-TH.rst +++ /dev/null @@ -1,10 +0,0 @@ -Transforms helper functions -~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -The following functions in the `.transforms` module are deprecated, -because they are considerer internal functionality and should not be used -by end users: - -- ``matplotlib.transforms.nonsingular`` -- ``matplotlib.transforms.interval_contains`` -- ``matplotlib.transforms.interval_contains_open`` diff --git a/doc/api/next_api_changes/deprecations/30993-SS.rst b/doc/api/next_api_changes/deprecations/30993-SS.rst deleted file mode 100644 index 152d25ba438d..000000000000 --- a/doc/api/next_api_changes/deprecations/30993-SS.rst +++ /dev/null @@ -1,5 +0,0 @@ -``InvertedSymmetricalLogTransform.invlinthresh`` -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -The ``invlinthresh`` attribute of `.InvertedSymmetricalLogTransform` is -deprecated. Use the ``.inverted().transform(linthresh)`` method instead. diff --git a/doc/api/next_api_changes/deprecations/31023-AL.rst b/doc/api/next_api_changes/deprecations/31023-AL.rst deleted file mode 100644 index ac2e8be2e708..000000000000 --- a/doc/api/next_api_changes/deprecations/31023-AL.rst +++ /dev/null @@ -1,4 +0,0 @@ -``cbook.normalize_kwargs`` only supports passing artists and artist classes as second argument -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -Support for directly passing an alias mapping or None as second argument to -`.cbook.normalize_kwargs` has been deprecated. diff --git a/doc/api/next_api_changes/deprecations/31143-AL.rst b/doc/api/next_api_changes/deprecations/31143-AL.rst deleted file mode 100644 index 7de02ff83896..000000000000 --- a/doc/api/next_api_changes/deprecations/31143-AL.rst +++ /dev/null @@ -1,3 +0,0 @@ -``backend_svg.XMLWriter`` is deprecated -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -It is an internal helper not intended for external use. diff --git a/doc/api/next_api_changes/deprecations/31170-AL.rst b/doc/api/next_api_changes/deprecations/31170-AL.rst deleted file mode 100644 index ecf1f31f1cff..000000000000 --- a/doc/api/next_api_changes/deprecations/31170-AL.rst +++ /dev/null @@ -1,6 +0,0 @@ -``kw``, ``fontproperties``, ``labelcolor``, and ``verts`` attributes of ``QuiverKey`` -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -These attributes are deprecated (note that ``fontproperties``, ``labelcolor``, -or ``verts`` after the first draw had no effect previously). Directly -access the relevant attributes on the sub-artists ``QuiverKey.vector`` and -``QuiverKey.text``, instead. diff --git a/doc/api/next_api_changes/deprecations/31248-SS.rst b/doc/api/next_api_changes/deprecations/31248-SS.rst deleted file mode 100644 index 1d7adbdf0fde..000000000000 --- a/doc/api/next_api_changes/deprecations/31248-SS.rst +++ /dev/null @@ -1,9 +0,0 @@ -Arbitrary code in ``axes.prop_cycle`` rcParam strings -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -The ``axes.prop_cycle`` rcParam accepts Python expressions that are evaluated -in a limited context. The evaluation context has been further limited and some -expressions that previously worked (list comprehensions, for example) no longer -will. This change is made without a deprecation period to improve security. -The previously documented cycler operations at -https://matplotlib.org/cycler/ are still supported. diff --git a/doc/api/next_api_changes/deprecations/31347-TH.rst b/doc/api/next_api_changes/deprecations/31347-TH.rst deleted file mode 100644 index 991406e08b97..000000000000 --- a/doc/api/next_api_changes/deprecations/31347-TH.rst +++ /dev/null @@ -1,8 +0,0 @@ -Contour labelling on filled contours -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -Using `~.Axes.clabel` to label filled contours created with `~.Axes.contourf` is deprecated. ``clabel()`` -is designed to label contour lines (`.Axes.contour`), and using it with filled contours can lead to inconsistent -plots. If you want to add labels to filled contours, the recommended approach is to first create the filled contours -with `~.Axes.contourf`, then overlay contour lines using `~.Axes.contour`, and finally apply `~.Axes.clabel` to those -contour lines for labeling. For an example see :doc:`/gallery/images_contours_and_fields/contourf_demo`. diff --git a/doc/api/next_api_changes/deprecations/31416-TH.rst b/doc/api/next_api_changes/deprecations/31416-TH.rst deleted file mode 100644 index 6d6d4b7b7809..000000000000 --- a/doc/api/next_api_changes/deprecations/31416-TH.rst +++ /dev/null @@ -1,8 +0,0 @@ -Formatter attributes -~~~~~~~~~~~~~~~~~~~~ - -These following attributes are considered internal and users should not have a need to access them: - -- `.ScalarFormatter`: ``orderOfMagnitude`` and ``format`` -- `.ConciseDateFormatter`: ``offset_format`` -- `.Formatter`: ``locs`` diff --git a/doc/api/next_api_changes/deprecations/31468-ES.rst b/doc/api/next_api_changes/deprecations/31468-ES.rst deleted file mode 100644 index a71644a6e4f5..000000000000 --- a/doc/api/next_api_changes/deprecations/31468-ES.rst +++ /dev/null @@ -1,6 +0,0 @@ -``image.thumbnail`` -~~~~~~~~~~~~~~~~~~~ - -... is deprecated without replacement. Use :external:py:`Pillow's thumbnail -method ` instead. See also the `Pillow tutorial -`_. diff --git a/doc/api/next_api_changes/deprecations/31521-ES.rst b/doc/api/next_api_changes/deprecations/31521-ES.rst deleted file mode 100644 index fc04b69a50fd..000000000000 --- a/doc/api/next_api_changes/deprecations/31521-ES.rst +++ /dev/null @@ -1,7 +0,0 @@ -Font hinting factor is deprecated -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -Due to internal changes to support complex text rendering, the hinting factor on fonts is -no longer used. Setting the ``text.hinting_factor`` rcParam to any value other than None -is deprecated, and the rcParam will be removed in the future. Likewise, passing the -``hinting_factor`` argument to the `.FT2Font` constructor is deprecated. diff --git a/doc/api/next_api_changes/deprecations/31630-ES.rst b/doc/api/next_api_changes/deprecations/31630-ES.rst deleted file mode 100644 index 2509b4323022..000000000000 --- a/doc/api/next_api_changes/deprecations/31630-ES.rst +++ /dev/null @@ -1,10 +0,0 @@ -``apply_theta_transforms`` option in ``PolarTransform`` -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -Applying theta transforms in `~matplotlib.projections.polar.PolarTransform` and -`~matplotlib.projections.polar.InvertedPolarTransform` has been removed, and the -*apply_theta_transforms* keyword argument is deprecated for both classes. - -If you need to retain the behaviour where theta values are transformed, chain the -``PolarTransform`` with a `~matplotlib.transforms.Affine2D` transform that performs the -theta shift and/or sign shift. diff --git a/doc/api/prev_api_changes/api_changes_3.11.0.rst b/doc/api/prev_api_changes/api_changes_3.11.0.rst index 1dbaeda7e796..63a725b7854c 100644 --- a/doc/api/prev_api_changes/api_changes_3.11.0.rst +++ b/doc/api/prev_api_changes/api_changes_3.11.0.rst @@ -7,6 +7,8 @@ API Changes for 3.11.0 .. include:: /api/prev_api_changes/api_changes_3.10.0/behavior.rst +.. include:: /api/prev_api_changes/api_changes_3.10.0/deprecations.rst + .. include:: /api/prev_api_changes/api_changes_3.10.0/removals.rst .. include:: /api/prev_api_changes/api_changes_3.10.0/development.rst diff --git a/doc/api/prev_api_changes/api_changes_3.11.0/deprecations.rst b/doc/api/prev_api_changes/api_changes_3.11.0/deprecations.rst new file mode 100644 index 000000000000..8c53fe594c06 --- /dev/null +++ b/doc/api/prev_api_changes/api_changes_3.11.0/deprecations.rst @@ -0,0 +1,289 @@ +In-place modification of colormaps +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Colormaps are planned to become immutable in the long term. + +As a first step, in-place modifications of colormaps are now pending-deprecated. This +affects the following methods of `.Colormap`: + +- `.Colormap.set_bad` - use ``cmap.with_extremes(bad=...)`` instead +- `.Colormap.set_under` - use ``cmap.with_extremes(under=...)`` instead +- `.Colormap.set_over` - use ``cmap.with_extremes(over=...)`` instead +- `.Colormap.set_extremes` - use ``cmap.with_extremes(...)`` instead + +Use the respective `.Colormap.with_extremes` and appropriate keyword arguments instead +which returns a copy of the colormap (available since Matplotlib 3.4). Alternatively, if +you create the colormap yourself, you can also pass the respective arguments to the +constructor (available since Matplotlib 3.11). + +Contour labelling on filled contours +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Using `~.Axes.clabel` to label filled contours created with `~.Axes.contourf` is +deprecated. ``clabel()`` is designed to label contour lines (`.Axes.contour`), and using +it with filled contours can lead to inconsistent plots. If you want to add labels to +filled contours, the recommended approach is to first create the filled contours with +`~.Axes.contourf`, then overlay contour lines using `~.Axes.contour`, and finally apply +`~.Axes.clabel` to those contour lines for labeling. For an example see +:doc:`/gallery/images_contours_and_fields/contourf_demo`. + +``boxplot`` and ``bxp`` *vert* parameter, and ``rcParams["boxplot.vertical"]`` +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +The parameter *vert: bool* has been deprecated on `~.Axes.boxplot` and `~.Axes.bxp`. It +is replaced by *orientation: {"vertical", "horizontal"}* for API consistency. + +``rcParams["boxplot.vertical"]``, which controlled the orientation of ``boxplot``, is +deprecated without replacement. + +``violinplot`` and ``violin`` *vert* parameter +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +The parameter *vert: bool* has been deprecated on `~.Axes.violinplot` and +`~.Axes.violin`. It will be replaced by *orientation: {"vertical", "horizontal"}* for +API consistency. + +Arbitrary code in ``axes.prop_cycle`` rcParam strings +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +The ``axes.prop_cycle`` rcParam accepts Python expressions that are evaluated in a +limited context. The evaluation context has been further limited and some expressions +that previously worked (list comprehensions, for example) no longer will. This change is +made without a deprecation period to improve security. The previously documented cycler +operations at https://matplotlib.org/cycler/ are still supported. + +Capitalization of None in matplotlibrc +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +In :file:`matplotlibrc` config files every capitalization of None was accepted for +denoting the Python constant `None`. This is now deprecated, and the only accepted +capitalization is None, i.e., starting with a capital letter and all other letters in +lowercase. + +Third-party scales no longer need to have an *axis* parameter +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Since Matplotlib 3.1 `PR 12831 `_ +scale objects should be reusable and therefore independent of any particular Axis. +Therefore, the use of the *axis* parameter in the ``__init__`` had been discouraged. +However, having that parameter in the signature was still necessary for API +backwards-compatibility. This is no longer the case. + +`.register_scale` now accepts scale classes with or without this parameter. + +The *axis* parameter is pending-deprecated. It will be deprecated in Matplotlib 3.13, +and removed in Matplotlib 3.15. + +Third-party scales are recommended to remove the *axis* parameter now if they can afford +to restrict compatibility to Matplotlib >= 3.11 already. Otherwise, they may keep the +*axis* parameter and remove it in time for Matplotlib 3.13. + +``matplotlib.style.core`` +~~~~~~~~~~~~~~~~~~~~~~~~~ + +The ``matplotlib.style.core`` module is deprecated. All APIs intended for public use are +now available in `matplotlib.style` directly (including ``USER_LIBRARY_PATHS``, which +was previously not reexported). + +The following APIs of ``matplotlib.style.core`` have been deprecated with no +replacement: ``BASE_LIBRARY_PATH``, ``STYLE_EXTENSION``, ``STYLE_BLACKLIST``, +``update_user_library``, ``read_style_directory``, ``update_nested_dict``. + +Font hinting and kerning factors +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Due to internal changes to support complex text rendering, the hinting factor and +kerning factor on fonts are no longer used. Setting the ``text.hinting_factor`` or +``text.kerning_factor`` rcParams (the latter of which existed only for +backwards-compatibility) to any value other than None is deprecated, and they will be +removed in the future. + +Likewise, passing the ``hinting_factor`` argument to the `.FT2Font` constructor is +deprecated. + +``FT2Image`` image buffer +~~~~~~~~~~~~~~~~~~~~~~~~~ + +Use 2D uint8 ndarrays instead. In particular: + +- The ``FT2Image`` constructor took ``width, height`` as separate parameters but the + ndarray constructor takes ``(height, width)`` as single tuple parameter. +- `.FT2Font.draw_glyph_to_bitmap` now (also) takes 2D uint8 arrays as input. +- ``FT2Image.draw_rect_filled`` should be replaced by directly setting pixel values to + black. +- The ``image`` attribute of the object returned by ``MathTextParser("agg").parse`` is + now a 2D uint8 array. + +``DviFont.widths`` +~~~~~~~~~~~~~~~~~~ + +... is deprecated with no replacement. + +``PdfFile`` internals +~~~~~~~~~~~~~~~~~~~~~ + +The ``PdfFile.dviFontInfo``, ``PdfFile.fontNames``, ``PdfFile.multi_byte_charprocs``, +and ``PdfFile.type1Descriptors`` attributes are deprecated with no replacement. + +The *fontfile* parameter of ``PdfFile.createType1Descriptor`` is deprecated; all +relevant pieces of information are now directly extracted from the *t1font* argument. + +``Tfm``'s internal metrics +~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Direct access to ``Tfm``'s ``widths``, ``heights``, ``depths`` dicts is deprecated; +access a glyph's metrics with `.Tfm.get_metrics` instead. + +``font_manager.is_opentype_cff_font`` is deprecated +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +There is no replacement. + +``Axes.set_navigate_mode`` is deprecated +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +... with no replacement. + +Parameters ``Axes3D.set_aspect(..., anchor=..., share=...)`` +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +The parameters *anchor* and *share* of `.Axes3D.set_aspect` are deprecated. They had no +effect on 3D axes and will be removed in a future version. + +``BezierSegment.point_at_t`` +~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +... is deprecated. Instead, it is possible to call the BezierSegment with an argument. + +Formatter attributes +~~~~~~~~~~~~~~~~~~~~ + +These following attributes are considered internal and users should not have a need to +access them: + +- `.ScalarFormatter`: ``orderOfMagnitude`` and ``format`` +- `.ConciseDateFormatter`: ``offset_format`` +- `.Formatter`: ``locs`` + +Parameter ``ListedColormap(..., N=...)`` +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Passing the parameter *N* to `.ListedColormap` is deprecated. Please preprocess the list +colors yourself if needed. + +``kw``, ``fontproperties``, ``labelcolor``, and ``verts`` attributes of ``QuiverKey`` +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +These attributes are deprecated (note that modifying ``fontproperties``, ``labelcolor``, +or ``verts`` after the first draw had no effect previously). Directly access the +relevant attributes on the sub-artists ``QuiverKey.vector`` and ``QuiverKey.text``, +instead. + +``apply_theta_transforms`` option in ``PolarTransform`` +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Applying theta transforms in `~matplotlib.projections.polar.PolarTransform` and +`~matplotlib.projections.polar.InvertedPolarTransform` has been removed, and the +*apply_theta_transforms* keyword argument is deprecated for both classes. + +If you need to retain the behaviour where theta values are transformed, chain the +``PolarTransform`` with a `~matplotlib.transforms.Affine2D` transform that performs the +theta shift and/or sign shift. + +*axes* parameter of ``RadialLocator`` +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +... is deprecated. `~.polar.RadialLocator` now fetches the relevant information from the +Axis' parent Axes. + +Transform helper functions +~~~~~~~~~~~~~~~~~~~~~~~~~~ + +The following functions in the `.transforms` module are deprecated, because they are +considerer internal functionality and should not be used by end users: + +- ``matplotlib.transforms.nonsingular`` +- ``matplotlib.transforms.interval_contains`` +- ``matplotlib.transforms.interval_contains_open`` + +``InvertedSymmetricalLogTransform.invlinthresh`` +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +The ``invlinthresh`` attribute of `.InvertedSymmetricalLogTransform` is deprecated. Use +the ``.inverted().transform(linthresh)`` method instead. + +:mod:`.axisartist` now uses more standard tick direction controls +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Previously, the position of :mod:`.axisartist` ticks (inside or outside the axes) were +set using ``set_tick_out(bool)``. They are now set using ``set_tick_direction("in")`` +(or "out", or "inout"), and respect :rc:`xtick.direction` and :rc:`ytick.direction`. In +particular, they default to pointing outwards, consistently with the rest of the +library. + +The *tick_out* parameter of `.Ticks` has been deprecated (use *tick_direction* instead). +The ``Ticks.get_tick_out`` method is deprecated (use `.Ticks.get_tick_direction` +instead). + +The unused ``locs_angles_labels`` attribute of `.Ticks` and `.LabelBase` has also been +deprecated. + +``GridFinder.get_grid_info`` now takes a single bbox as parameter +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Passing ``x1, y1, x2, y2`` as separate parameters is deprecated. + +``GridFinder.transform_xy`` and ``GridFinder.inv_transform_xy`` +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +... are deprecated. Directly use the standard transform returned by +`.GridFinder.get_transform` instead. + +``axes_grid.Grid.ngrids`` +~~~~~~~~~~~~~~~~~~~~~~~~~ + +This attribute has been deprecated and renamed ``n_axes``, consistently with the new +name of the `~.axes_grid.Grid` constructor parameter that allows setting the actual +number of axes in the grid (the old parameter, ``ngrids``, did not actually work since +Matplotlib 3.3). + +The same change has been made in ``axes_grid.ImageGrid``. + +*canvas* parameter to ``MultiCursor`` +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +... is deprecated. It has been unused for a while already. + +Please remove the parameter and change the call from ``MultiCursor(canvas, axes)`` to +``MultiCursor(axes)``. Both calls are valid throughout the deprecation period. + +``CallbackRegistry.disconnect`` *cid* parameter renamed to *cid_or_func* +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +The *cid* parameter of `.CallbackRegistry.disconnect` has been renamed to *cid_or_func*. +The method now also accepts a callable, which will disconnect that callback from all +signals or from a specific signal if the *signal* keyword argument is provided. + +``cbook.normalize_kwargs`` only supports passing artists and artist classes as second argument +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Support for directly passing an alias mapping or None as second argument to +`.cbook.normalize_kwargs` has been deprecated. + +``backend_svg.XMLWriter`` is deprecated +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +It is an internal helper not intended for external use. + +``image.thumbnail`` +~~~~~~~~~~~~~~~~~~~ + +... is deprecated without replacement. Use :external:py:`Pillow's thumbnail method +` instead. See also the `Pillow tutorial +`_. + +``testing.widgets.mock_event`` and ``testing.widgets.do_event`` +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +... are deprecated. Directly construct Event objects (typically `.MouseEvent` or +`.KeyEvent`) and pass them to ``canvas.callbacks.process()`` instead.