From 769865b35dcd2b4efa28d9198f8ab83161e8bfd0 Mon Sep 17 00:00:00 2001 From: Thomas A Caswell Date: Fri, 10 Feb 2023 14:35:14 -0500 Subject: [PATCH 1/3] DOC: Prepare release notes for 3.7.0 DOC: updated the supported versions of Matplotlib DOC: re-run the github status DOC: start to merge the whats_new DOC: re-arrange whats new DOC: add top-level rst TOC for 3.7 docs DOC: fix markup in github stats 3.7.0 behavior and deprecation release notes 3.7.0 removals DOC: merge up development API changes DOC: spell behaviour britishly Remove files, add last release note DOC: update switcher.json Fix broken links DOC: fix internal links DOC: more links fix version number in dependency version list Last couple release notes Update github stats --- SECURITY.md | 3 +- doc/_static/switcher.json | 9 +- .../next_api_changes/behavior/23573-AL.rst | 7 - .../next_api_changes/behavior/23579-AL.rst | 5 - .../next_api_changes/behavior/23710-ES.rst | 7 - .../next_api_changes/behavior/24062-tb.rst | 8 - .../next_api_changes/behavior/24131-OG.rst | 6 - .../next_api_changes/behavior/24132-GL.rst | 29 -- .../next_api_changes/behavior/24189-JB.rst | 10 - .../next_api_changes/behavior/24570-GL.rst | 5 - .../next_api_changes/behavior/24655-AK.rst | 15 - .../next_api_changes/behavior/24829-AL.rst | 3 - .../next_api_changes/behavior/24870-AL.rst | 5 - .../next_api_changes/behavior/24889-AL.rst | 3 - .../next_api_changes/behavior/24912-AL.rst | 4 - .../next_api_changes/behavior/9598-AFV.rst | 6 - .../deprecations/19763-ES.rst | 5 - .../deprecations/22314-AL.rst | 3 - .../deprecations/23449-SS.rst | 3 - .../deprecations/23720-RS.rst | 13 - .../deprecations/23735-ES.rst | 13 - .../deprecations/23824-OG.rst | 16 - .../deprecations/24000-TH.rst | 5 - .../deprecations/24013-TH.rst | 5 - .../deprecations/24071-OG.rst | 9 - .../deprecations/24088-JMK.rst | 9 - .../deprecations/24131-OG.rst | 5 - .../deprecations/24140-AL.rst | 8 - .../deprecations/24144-AL.rst | 5 - .../deprecations/24198-AL.rst | 3 - .../deprecations/24208-AL.rst | 3 - .../deprecations/24220-AL.rst | 5 - .../deprecations/24221-AL.rst | 5 - .../deprecations/24224-OG.rst | 5 - .../deprecations/24240-OG.rst | 6 - .../deprecations/24254-OG.rst | 6 - .../deprecations/24305-AL.rst | 5 - .../deprecations/24455-AL.rst | 3 - .../deprecations/24465-AL.rst | 10 - .../deprecations/24474_CM.rst | 4 - .../deprecations/24538-OG.rst | 4 - .../deprecations/24577-AL.rst | 2 - .../deprecations/24664-OG.rst | 5 - .../deprecations/24688-OG.rst | 5 - .../deprecations/24730-TH.rst | 24 - .../deprecations/24806-KS.rst | 4 - .../deprecations/24846-ES.rst | 30 -- .../deprecations/24864-AL.rst | 10 - .../deprecations/24904-AL.rst | 4 - .../deprecations/25196-EP.rst | 4 - .../next_api_changes/development/23683-AL.rst | 2 - .../next_api_changes/development/24257-AL.rst | 2 - .../next_api_changes/development/24710-AL.rst | 4 - .../next_api_changes/development/24724-ES.rst | 5 - .../next_api_changes/development/24887-OG.rst | 2 - .../next_api_changes/development/24893-KS.rst | 8 - .../next_api_changes/removals/21661-TAC.rst | 12 - .../next_api_changes/removals/24125-OG.rst | 68 --- .../next_api_changes/removals/24128-OG.rst | 17 - .../next_api_changes/removals/24129-OG.rst | 33 -- .../next_api_changes/removals/24251-OG.rst | 4 - .../next_api_changes/removals/24253-OG.rst | 5 - .../next_api_changes/removals/24254-OG.rst | 64 --- .../next_api_changes/removals/24257-AL.rst | 4 - .../next_api_changes/removals/24355-OG.rst | 6 - .../next_api_changes/removals/24356-OG.rst | 19 - .../next_api_changes/removals/24624-AL.rst | 10 - .../next_api_changes/removals/24948-ES.rst | 115 ----- .../next_api_changes/removals/24965-ES.rst | 5 - .../prev_api_changes/api_changes_3.7.0.rst | 14 + .../api_changes_3.7.0/behaviour.rst | 136 ++++++ .../api_changes_3.7.0/deprecations.rst | 291 +++++++++++ .../api_changes_3.7.0/development.rst | 49 ++ .../api_changes_3.7.0/removals.rst | 369 ++++++++++++++ doc/devel/development_setup.rst | 2 +- doc/devel/development_workflow.rst | 4 +- doc/index.rst | 2 +- doc/users/explain/figures.rst | 2 +- doc/users/github_stats.rst | 80 +++- .../next_whats_new/3d_pane_color_rcparams.rst | 18 - .../3d_plot_aspects_adjustable_keyword.rst | 34 -- doc/users/next_whats_new/3d_plot_pan_zoom.rst | 8 - .../next_whats_new/bar_label_formatting.rst | 33 -- .../colorbar_has_location_argument.rst | 25 - doc/users/next_whats_new/documentation.rst | 6 - .../next_whats_new/ellipse_annotation.rst | 15 - doc/users/next_whats_new/figure_hooks.rst | 8 - .../next_whats_new/imshow_extent_units.rst | 20 - .../next_whats_new/legend-figure-outside.rst | 8 - .../next_whats_new/per_subplot_mosaic.rst | 30 -- doc/users/next_whats_new/pie_hatch.rst | 18 - .../next_whats_new/polar_errorbar_caps.rst | 7 - doc/users/next_whats_new/reverse_legend.rst | 4 - doc/users/next_whats_new/rgba_pcolormesh.rst | 16 - .../next_whats_new/shade_poly3dcollection.rst | 33 -- .../show_source_links_directive_option.rst | 7 - .../next_whats_new/styles_from_packages.rst | 11 - .../view_current_axis_format.rst | 29 -- doc/users/next_whats_new/widget_blitting.rst | 7 - .../next_whats_new/widget_button_styling.rst | 31 -- doc/users/prev_whats_new/whats_new_3.7.0.rst | 450 ++++++++++++++++++ doc/users/release_notes.rst | 13 +- examples/README.txt | 6 +- lib/matplotlib/path.py | 2 +- tutorials/README.txt | 6 +- 105 files changed, 1412 insertions(+), 1138 deletions(-) delete mode 100644 doc/api/next_api_changes/behavior/23573-AL.rst delete mode 100644 doc/api/next_api_changes/behavior/23579-AL.rst delete mode 100644 doc/api/next_api_changes/behavior/23710-ES.rst delete mode 100644 doc/api/next_api_changes/behavior/24062-tb.rst delete mode 100644 doc/api/next_api_changes/behavior/24131-OG.rst delete mode 100644 doc/api/next_api_changes/behavior/24132-GL.rst delete mode 100644 doc/api/next_api_changes/behavior/24189-JB.rst delete mode 100644 doc/api/next_api_changes/behavior/24570-GL.rst delete mode 100644 doc/api/next_api_changes/behavior/24655-AK.rst delete mode 100644 doc/api/next_api_changes/behavior/24829-AL.rst delete mode 100644 doc/api/next_api_changes/behavior/24870-AL.rst delete mode 100644 doc/api/next_api_changes/behavior/24889-AL.rst delete mode 100644 doc/api/next_api_changes/behavior/24912-AL.rst delete mode 100644 doc/api/next_api_changes/behavior/9598-AFV.rst delete mode 100644 doc/api/next_api_changes/deprecations/19763-ES.rst delete mode 100644 doc/api/next_api_changes/deprecations/22314-AL.rst delete mode 100644 doc/api/next_api_changes/deprecations/23449-SS.rst delete mode 100644 doc/api/next_api_changes/deprecations/23720-RS.rst delete mode 100644 doc/api/next_api_changes/deprecations/23735-ES.rst delete mode 100644 doc/api/next_api_changes/deprecations/23824-OG.rst delete mode 100644 doc/api/next_api_changes/deprecations/24000-TH.rst delete mode 100644 doc/api/next_api_changes/deprecations/24013-TH.rst delete mode 100644 doc/api/next_api_changes/deprecations/24071-OG.rst delete mode 100644 doc/api/next_api_changes/deprecations/24088-JMK.rst delete mode 100644 doc/api/next_api_changes/deprecations/24131-OG.rst delete mode 100644 doc/api/next_api_changes/deprecations/24140-AL.rst delete mode 100644 doc/api/next_api_changes/deprecations/24144-AL.rst delete mode 100644 doc/api/next_api_changes/deprecations/24198-AL.rst delete mode 100644 doc/api/next_api_changes/deprecations/24208-AL.rst delete mode 100644 doc/api/next_api_changes/deprecations/24220-AL.rst delete mode 100644 doc/api/next_api_changes/deprecations/24221-AL.rst delete mode 100644 doc/api/next_api_changes/deprecations/24224-OG.rst delete mode 100644 doc/api/next_api_changes/deprecations/24240-OG.rst delete mode 100644 doc/api/next_api_changes/deprecations/24254-OG.rst delete mode 100644 doc/api/next_api_changes/deprecations/24305-AL.rst delete mode 100644 doc/api/next_api_changes/deprecations/24455-AL.rst delete mode 100644 doc/api/next_api_changes/deprecations/24465-AL.rst delete mode 100644 doc/api/next_api_changes/deprecations/24474_CM.rst delete mode 100644 doc/api/next_api_changes/deprecations/24538-OG.rst delete mode 100644 doc/api/next_api_changes/deprecations/24577-AL.rst delete mode 100644 doc/api/next_api_changes/deprecations/24664-OG.rst delete mode 100644 doc/api/next_api_changes/deprecations/24688-OG.rst delete mode 100644 doc/api/next_api_changes/deprecations/24730-TH.rst delete mode 100644 doc/api/next_api_changes/deprecations/24806-KS.rst delete mode 100644 doc/api/next_api_changes/deprecations/24846-ES.rst delete mode 100644 doc/api/next_api_changes/deprecations/24864-AL.rst delete mode 100644 doc/api/next_api_changes/deprecations/24904-AL.rst delete mode 100644 doc/api/next_api_changes/deprecations/25196-EP.rst delete mode 100644 doc/api/next_api_changes/development/23683-AL.rst delete mode 100644 doc/api/next_api_changes/development/24257-AL.rst delete mode 100644 doc/api/next_api_changes/development/24710-AL.rst delete mode 100644 doc/api/next_api_changes/development/24724-ES.rst delete mode 100644 doc/api/next_api_changes/development/24887-OG.rst delete mode 100644 doc/api/next_api_changes/development/24893-KS.rst delete mode 100644 doc/api/next_api_changes/removals/21661-TAC.rst delete mode 100644 doc/api/next_api_changes/removals/24125-OG.rst delete mode 100644 doc/api/next_api_changes/removals/24128-OG.rst delete mode 100644 doc/api/next_api_changes/removals/24129-OG.rst delete mode 100644 doc/api/next_api_changes/removals/24251-OG.rst delete mode 100644 doc/api/next_api_changes/removals/24253-OG.rst delete mode 100644 doc/api/next_api_changes/removals/24254-OG.rst delete mode 100644 doc/api/next_api_changes/removals/24257-AL.rst delete mode 100644 doc/api/next_api_changes/removals/24355-OG.rst delete mode 100644 doc/api/next_api_changes/removals/24356-OG.rst delete mode 100644 doc/api/next_api_changes/removals/24624-AL.rst delete mode 100644 doc/api/next_api_changes/removals/24948-ES.rst delete mode 100644 doc/api/next_api_changes/removals/24965-ES.rst create mode 100644 doc/api/prev_api_changes/api_changes_3.7.0.rst create mode 100644 doc/api/prev_api_changes/api_changes_3.7.0/behaviour.rst create mode 100644 doc/api/prev_api_changes/api_changes_3.7.0/deprecations.rst create mode 100644 doc/api/prev_api_changes/api_changes_3.7.0/development.rst create mode 100644 doc/api/prev_api_changes/api_changes_3.7.0/removals.rst delete mode 100644 doc/users/next_whats_new/3d_pane_color_rcparams.rst delete mode 100644 doc/users/next_whats_new/3d_plot_aspects_adjustable_keyword.rst delete mode 100644 doc/users/next_whats_new/3d_plot_pan_zoom.rst delete mode 100644 doc/users/next_whats_new/bar_label_formatting.rst delete mode 100644 doc/users/next_whats_new/colorbar_has_location_argument.rst delete mode 100644 doc/users/next_whats_new/documentation.rst delete mode 100644 doc/users/next_whats_new/ellipse_annotation.rst delete mode 100644 doc/users/next_whats_new/figure_hooks.rst delete mode 100644 doc/users/next_whats_new/imshow_extent_units.rst delete mode 100644 doc/users/next_whats_new/legend-figure-outside.rst delete mode 100644 doc/users/next_whats_new/per_subplot_mosaic.rst delete mode 100644 doc/users/next_whats_new/pie_hatch.rst delete mode 100644 doc/users/next_whats_new/polar_errorbar_caps.rst delete mode 100644 doc/users/next_whats_new/reverse_legend.rst delete mode 100644 doc/users/next_whats_new/rgba_pcolormesh.rst delete mode 100644 doc/users/next_whats_new/shade_poly3dcollection.rst delete mode 100644 doc/users/next_whats_new/show_source_links_directive_option.rst delete mode 100644 doc/users/next_whats_new/styles_from_packages.rst delete mode 100644 doc/users/next_whats_new/view_current_axis_format.rst delete mode 100644 doc/users/next_whats_new/widget_blitting.rst delete mode 100644 doc/users/next_whats_new/widget_button_styling.rst create mode 100644 doc/users/prev_whats_new/whats_new_3.7.0.rst diff --git a/SECURITY.md b/SECURITY.md index 73ec8fdb3a38..1de4c3d8e4a3 100644 --- a/SECURITY.md +++ b/SECURITY.md @@ -8,8 +8,9 @@ versions. | Version | Supported | | ------- | ------------------ | +| 3.7.x | :white_check_mark: | | 3.6.x | :white_check_mark: | -| 3.5.x | :white_check_mark: | +| 3.5.x | :x: | | 3.4.x | :x: | | 3.3.x | :x: | | < 3.3 | :x: | diff --git a/doc/_static/switcher.json b/doc/_static/switcher.json index c72cbac2b27a..b96977bdd725 100644 --- a/doc/_static/switcher.json +++ b/doc/_static/switcher.json @@ -1,14 +1,19 @@ [ { - "name": "3.6 (stable)", + "name": "3.7 (stable)", "version": "stable", "url": "https://matplotlib.org/stable/" }, { - "name": "3.7 (dev)", + "name": "3.8 (dev)", "version": "dev", "url": "https://matplotlib.org/devdocs/" }, + { + "name": "3.6", + "version": "3.6.3", + "url": "https://matplotlib.org/3.6.3/" + }, { "name": "3.5", "version": "3.5.3", diff --git a/doc/api/next_api_changes/behavior/23573-AL.rst b/doc/api/next_api_changes/behavior/23573-AL.rst deleted file mode 100644 index f388b414ae9a..000000000000 --- a/doc/api/next_api_changes/behavior/23573-AL.rst +++ /dev/null @@ -1,7 +0,0 @@ -All Axes have ``get_subplotspec`` and ``get_gridspec`` methods now, which returns None for Axes not positioned via a gridspec -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -Previously, this method was only present for Axes positioned via a gridspec. -Following this change, checking ``hasattr(ax, "get_gridspec")`` should now be -replaced by ``ax.get_gridspec() is not None``. For compatibility with older -Matplotlib releases, one can also check -``hasattr(ax, "get_gridspec") and ax.get_gridspec() is not None``. diff --git a/doc/api/next_api_changes/behavior/23579-AL.rst b/doc/api/next_api_changes/behavior/23579-AL.rst deleted file mode 100644 index dd79e4e25be7..000000000000 --- a/doc/api/next_api_changes/behavior/23579-AL.rst +++ /dev/null @@ -1,5 +0,0 @@ -``HostAxesBase.get_aux_axes`` now defaults to using the same base axes class as the host axes -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -If using an ``mpl_toolkits.axisartist``-based host Axes, the parasite Axes will -also be based on ``mpl_toolkits.axisartist``. This behavior is consistent with -``HostAxesBase.twin``, ``HostAxesBase.twinx``, and ``HostAxesBase.twiny``. diff --git a/doc/api/next_api_changes/behavior/23710-ES.rst b/doc/api/next_api_changes/behavior/23710-ES.rst deleted file mode 100644 index 6b417167a149..000000000000 --- a/doc/api/next_api_changes/behavior/23710-ES.rst +++ /dev/null @@ -1,7 +0,0 @@ -``plt.get_cmap`` and ``matplotlib.cm.get_cmap`` return a copy -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -Formerly, `~.pyplot.get_cmap` and `.cm.get_cmap` returned a global version of a -`.Colormap`. This was prone to errors as modification of the colormap would -propagate from one location to another without warning. Now, a new copy of the -colormap is returned. diff --git a/doc/api/next_api_changes/behavior/24062-tb.rst b/doc/api/next_api_changes/behavior/24062-tb.rst deleted file mode 100644 index 7e5beaecba53..000000000000 --- a/doc/api/next_api_changes/behavior/24062-tb.rst +++ /dev/null @@ -1,8 +0,0 @@ -``TrapezoidMapTriFinder`` uses different random number generator -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -The random number generator used to determine the order of insertion of -triangle edges in ``TrapezoidMapTriFinder`` has changed. This can result in a -different triangle index being returned for a point that lies exactly on an -edge between two triangles. This can also affect triangulation interpolation -and refinement algorithms that use ``TrapezoidMapTriFinder``. diff --git a/doc/api/next_api_changes/behavior/24131-OG.rst b/doc/api/next_api_changes/behavior/24131-OG.rst deleted file mode 100644 index cfeb62440fc0..000000000000 --- a/doc/api/next_api_changes/behavior/24131-OG.rst +++ /dev/null @@ -1,6 +0,0 @@ -``FuncAnimation(save_count=None)`` -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -Passing ``save_count=None`` to `.FuncAnimation` no longer limits the number -of frames to 100. Make sure that it either can be inferred from *frames* -or provide an integer *save_count*. diff --git a/doc/api/next_api_changes/behavior/24132-GL.rst b/doc/api/next_api_changes/behavior/24132-GL.rst deleted file mode 100644 index 0ad50ad899c4..000000000000 --- a/doc/api/next_api_changes/behavior/24132-GL.rst +++ /dev/null @@ -1,29 +0,0 @@ -``CenteredNorm`` halfrange is not modified when vcenter changes -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -Previously, the **halfrange** would expand in proportion to the -amount that **vcenter** was moved away from either **vmin** or **vmax**. -Now, the halfrange remains fixed when vcenter is changed, and **vmin** and -**vmax** are updated based on the **vcenter** and **halfrange** values. - -For example, this is what the values were when changing vcenter previously. - -.. code-block:: - - norm = CenteredNorm(vcenter=0, halfrange=1) - # Move vcenter up by one - norm.vcenter = 1 - # updates halfrange and vmax (vmin stays the same) - # norm.halfrange == 2, vmin == -1, vmax == 3 - -and now, with that same example - -.. code-block:: - - norm = CenteredNorm(vcenter=0, halfrange=1) - norm.vcenter = 1 - # updates vmin and vmax (halfrange stays the same) - # norm.halfrange == 1, vmin == 0, vmax == 2 - -The **halfrange** can be set manually or ``norm.autoscale()`` -can be used to automatically set the limits after setting **vcenter**. diff --git a/doc/api/next_api_changes/behavior/24189-JB.rst b/doc/api/next_api_changes/behavior/24189-JB.rst deleted file mode 100644 index 378390557f49..000000000000 --- a/doc/api/next_api_changes/behavior/24189-JB.rst +++ /dev/null @@ -1,10 +0,0 @@ -``fig.subplot_mosaic`` no longer passes the ``gridspec_kw`` args to nested gridspecs. -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -For nested `.Figure.subplot_mosaic` layouts, it is almost always -inappropriate for *gridspec_kw* arguments to be passed to lower nest -levels, and these arguments are incompatible with the lower levels in -many cases. This dictionary is no longer passed to the inner -layouts. Users who need to modify *gridspec_kw* at multiple levels -should use `.Figure.subfigures` to get nesting, and construct the -inner layouts with `.Figure.subplots` or `.Figure.subplot_mosaic`. diff --git a/doc/api/next_api_changes/behavior/24570-GL.rst b/doc/api/next_api_changes/behavior/24570-GL.rst deleted file mode 100644 index 4ab0f5d1bcdb..000000000000 --- a/doc/api/next_api_changes/behavior/24570-GL.rst +++ /dev/null @@ -1,5 +0,0 @@ -``HPacker`` alignment with **bottom** or **top** are now correct -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -Previously, the **bottom** and **top** alignments were swapped. -This has been corrected so that the alignments correspond appropriately. diff --git a/doc/api/next_api_changes/behavior/24655-AK.rst b/doc/api/next_api_changes/behavior/24655-AK.rst deleted file mode 100644 index 04b4141e4517..000000000000 --- a/doc/api/next_api_changes/behavior/24655-AK.rst +++ /dev/null @@ -1,15 +0,0 @@ -On Windows only fonts known to the registry will be discovered -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -Previously, Matplotlib would recursively walk user and system font directories -to discover fonts, however this lead to a number of undesirable behaviors -including finding deleted fonts. Now Matplotlib will only find fonts that are -known to the Windows registry. - -This means that any user installed fonts must go through the Windows font -installer rather than simply being copied to the correct folder. - -This only impacts the set of fonts Matplotlib will consider when using -`matplotlib.font_manager.findfont`. To use an arbitrary font, directly pass the -path to a font as shown in -:doc:`/gallery/text_labels_and_annotations/font_file`. diff --git a/doc/api/next_api_changes/behavior/24829-AL.rst b/doc/api/next_api_changes/behavior/24829-AL.rst deleted file mode 100644 index 31e822821878..000000000000 --- a/doc/api/next_api_changes/behavior/24829-AL.rst +++ /dev/null @@ -1,3 +0,0 @@ -``QuadMesh.set_array`` now always raises ``ValueError`` for inputs with incorrect shapes -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -It could previously also raise `TypeError` in some cases. diff --git a/doc/api/next_api_changes/behavior/24870-AL.rst b/doc/api/next_api_changes/behavior/24870-AL.rst deleted file mode 100644 index a7fdeeb23b77..000000000000 --- a/doc/api/next_api_changes/behavior/24870-AL.rst +++ /dev/null @@ -1,5 +0,0 @@ -``contour`` and ``contourf`` auto-select suitable levels when given boolean inputs -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -If the height array given to `.Axes.contour` or `.Axes.contourf` is of bool -dtype and *levels* is not specified, *levels* now defaults to ``[0.5]`` for -`~.Axes.contour` and ``[0, 0.5, 1]`` for `.Axes.contourf`. diff --git a/doc/api/next_api_changes/behavior/24889-AL.rst b/doc/api/next_api_changes/behavior/24889-AL.rst deleted file mode 100644 index 95fb0c1cd5d8..000000000000 --- a/doc/api/next_api_changes/behavior/24889-AL.rst +++ /dev/null @@ -1,3 +0,0 @@ -``AxesImage.set_extent`` now raises ``TypeError`` for unknown keyword arguments -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -It previously raised a `ValueError`. diff --git a/doc/api/next_api_changes/behavior/24912-AL.rst b/doc/api/next_api_changes/behavior/24912-AL.rst deleted file mode 100644 index 3a87ed217f9f..000000000000 --- a/doc/api/next_api_changes/behavior/24912-AL.rst +++ /dev/null @@ -1,4 +0,0 @@ -``contour`` no longer warns if no contour lines are drawn. -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -This can occur if the user explicitly passes a ``levels`` array with no values -between ``z.min()`` and ``z.max()``; or if ``z`` has the same value everywhere. diff --git a/doc/api/next_api_changes/behavior/9598-AFV.rst b/doc/api/next_api_changes/behavior/9598-AFV.rst deleted file mode 100644 index 4edb930fe432..000000000000 --- a/doc/api/next_api_changes/behavior/9598-AFV.rst +++ /dev/null @@ -1,6 +0,0 @@ -Change of ``legend(loc="best")`` behavior ------------------------------------------ - -The algorithm of the auto-legend locator has been tweaked to better handle -non rectangular patches. Additional details on this change can be found in -:ghissue:`9580` and :ghissue:`9598`. diff --git a/doc/api/next_api_changes/deprecations/19763-ES.rst b/doc/api/next_api_changes/deprecations/19763-ES.rst deleted file mode 100644 index a7dc880a60c3..000000000000 --- a/doc/api/next_api_changes/deprecations/19763-ES.rst +++ /dev/null @@ -1,5 +0,0 @@ -``Cursor`` and ``MultiCursor`` event handlers are now private -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -Access to the event handlers for the `.Cursor` and `.MultiCursor` widgets is -now deprecated. The related *needclear* attribute is also deprecated. diff --git a/doc/api/next_api_changes/deprecations/22314-AL.rst b/doc/api/next_api_changes/deprecations/22314-AL.rst deleted file mode 100644 index bea929019865..000000000000 --- a/doc/api/next_api_changes/deprecations/22314-AL.rst +++ /dev/null @@ -1,3 +0,0 @@ -``passthru_pt`` -~~~~~~~~~~~~~~~ -This attribute of ``AxisArtistHelper``\s is deprecated. diff --git a/doc/api/next_api_changes/deprecations/23449-SS.rst b/doc/api/next_api_changes/deprecations/23449-SS.rst deleted file mode 100644 index cc5123fc0b7d..000000000000 --- a/doc/api/next_api_changes/deprecations/23449-SS.rst +++ /dev/null @@ -1,3 +0,0 @@ -``axes3d.vvec``, ``axes3d.eye``, ``axes3d.sx``, and ``axes3d.sy`` -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -... are deprecated without replacement. diff --git a/doc/api/next_api_changes/deprecations/23720-RS.rst b/doc/api/next_api_changes/deprecations/23720-RS.rst deleted file mode 100644 index 9e771009aa15..000000000000 --- a/doc/api/next_api_changes/deprecations/23720-RS.rst +++ /dev/null @@ -1,13 +0,0 @@ -Deprecation aliases in cbook -~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -The module ``matplotlib.cbook.deprecation`` was previously deprecated in -Matplotlib 3.4, along with deprecation-related API in ``matplotlib.cbook``. Due -to technical issues, ``matplotlib.cbook.MatplotlibDeprecationWarning`` and -``matplotlib.cbook.mplDeprecation`` did not raise deprecation warnings on use. -Changes in Python have now made it possible to warn when these aliases are -being used. - -In order to avoid downstream breakage, these aliases will now warn, and their -removal has been pushed from 3.6 to 3.8 to give time to notice said warnings. -As replacement, please use `matplotlib.MatplotlibDeprecationWarning`. diff --git a/doc/api/next_api_changes/deprecations/23735-ES.rst b/doc/api/next_api_changes/deprecations/23735-ES.rst deleted file mode 100644 index 075abf73d9d4..000000000000 --- a/doc/api/next_api_changes/deprecations/23735-ES.rst +++ /dev/null @@ -1,13 +0,0 @@ -``AXes`` subclasses should override ``clear`` instead of ``cla`` -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -For clarity, `.axes.Axes.clear` is now preferred over `.Axes.cla`. However, for -backwards compatibility, the latter will remain as an alias for the former. - -For additional compatibility with third-party libraries, Matplotlib will -continue to call the ``cla`` method of any `~.axes.Axes` subclasses if they -define it. In the future, this will no longer occur, and Matplotlib will only -call the ``clear`` method in `~.axes.Axes` subclasses. - -It is recommended to define only the ``clear`` method when on Matplotlib 3.6, -and only ``cla`` for older versions. diff --git a/doc/api/next_api_changes/deprecations/23824-OG.rst b/doc/api/next_api_changes/deprecations/23824-OG.rst deleted file mode 100644 index 3b229725b113..000000000000 --- a/doc/api/next_api_changes/deprecations/23824-OG.rst +++ /dev/null @@ -1,16 +0,0 @@ -``draw_gouraud_triangle`` -~~~~~~~~~~~~~~~~~~~~~~~~~ - -... is deprecated as in most backends this is a redundant call. Use -`~.RendererBase.draw_gouraud_triangles` instead. A ``draw_gouraud_triangle`` -call in a custom `~matplotlib.artist.Artist` can readily be replaced as:: - - self.draw_gouraud_triangles(gc, points.reshape((1, 3, 2)), - colors.reshape((1, 3, 4)), trans) - -A `~.RendererBase.draw_gouraud_triangles` method can be implemented from an -existing ``draw_gouraud_triangle`` method as:: - - transform = transform.frozen() - for tri, col in zip(triangles_array, colors_array): - self.draw_gouraud_triangle(gc, tri, col, transform) diff --git a/doc/api/next_api_changes/deprecations/24000-TH.rst b/doc/api/next_api_changes/deprecations/24000-TH.rst deleted file mode 100644 index d1025d1fbb95..000000000000 --- a/doc/api/next_api_changes/deprecations/24000-TH.rst +++ /dev/null @@ -1,5 +0,0 @@ -``matplotlib.pyplot.get_plot_commands`` -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -... is a pending deprecation. This is considered internal and no end-user -should need it. diff --git a/doc/api/next_api_changes/deprecations/24013-TH.rst b/doc/api/next_api_changes/deprecations/24013-TH.rst deleted file mode 100644 index 8870e2d58caa..000000000000 --- a/doc/api/next_api_changes/deprecations/24013-TH.rst +++ /dev/null @@ -1,5 +0,0 @@ -``matplotlib.tri`` submodules are deprecated -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -The ``matplotlib.tri.*`` submodules are deprecated. All functionality is -available in ``matplotlib.tri`` directly and should be imported from there. diff --git a/doc/api/next_api_changes/deprecations/24071-OG.rst b/doc/api/next_api_changes/deprecations/24071-OG.rst deleted file mode 100644 index 2ac7fb1a0711..000000000000 --- a/doc/api/next_api_changes/deprecations/24071-OG.rst +++ /dev/null @@ -1,9 +0,0 @@ -Passing undefined *label_mode* to ``Grid`` -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -... is deprecated. This includes `mpl_toolkits.axes_grid1.axes_grid.Grid`, -`mpl_toolkits.axes_grid1.axes_grid.AxesGrid`, and -`mpl_toolkits.axes_grid1.axes_grid.ImageGrid` as well as the corresponding -classes imported from `mpl_toolkits.axisartist.axes_grid`. - -Pass ``label_mode='keep'`` instead to get the previous behavior of not modifying labels. diff --git a/doc/api/next_api_changes/deprecations/24088-JMK.rst b/doc/api/next_api_changes/deprecations/24088-JMK.rst deleted file mode 100644 index caa7e93a05b4..000000000000 --- a/doc/api/next_api_changes/deprecations/24088-JMK.rst +++ /dev/null @@ -1,9 +0,0 @@ -Colorbars for orphaned mappables are deprecated, but no longer raise -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -Before 3.6.0, Colorbars for mappables that do not have a parent axes would -steal space from the current Axes. 3.6.0 raised an error on this, but without -a deprecation cycle. For 3.6.1 this is reverted, the current axes is used, -but a deprecation warning is shown instead. In this undetermined case users -and libraries should explicitly specify what axes they want space to be stolen -from: ``fig.colorbar(mappable, ax=plt.gca())``. diff --git a/doc/api/next_api_changes/deprecations/24131-OG.rst b/doc/api/next_api_changes/deprecations/24131-OG.rst deleted file mode 100644 index 835a2a5e0ef9..000000000000 --- a/doc/api/next_api_changes/deprecations/24131-OG.rst +++ /dev/null @@ -1,5 +0,0 @@ -``Animation`` attributes -~~~~~~~~~~~~~~~~~~~~~~~~ - -The attributes ``repeat`` of `.TimedAnimation` and subclasses and -``save_count`` of `.FuncAnimation` are considered private and deprecated. diff --git a/doc/api/next_api_changes/deprecations/24140-AL.rst b/doc/api/next_api_changes/deprecations/24140-AL.rst deleted file mode 100644 index afe10ddc6475..000000000000 --- a/doc/api/next_api_changes/deprecations/24140-AL.rst +++ /dev/null @@ -1,8 +0,0 @@ -``contour.ClabelText`` and ``ContourLabeler.set_label_props`` -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -... are deprecated. - -Use ``Text(..., transform_rotates_text=True)`` as a replacement for -``contour.ClabelText(...)`` and ``text.set(text=text, color=color, -fontproperties=labeler.labelFontProps, clip_box=labeler.axes.bbox)`` as a -replacement for the ``ContourLabeler.set_label_props(label, text, color)``. diff --git a/doc/api/next_api_changes/deprecations/24144-AL.rst b/doc/api/next_api_changes/deprecations/24144-AL.rst deleted file mode 100644 index 1f94bb572c83..000000000000 --- a/doc/api/next_api_changes/deprecations/24144-AL.rst +++ /dev/null @@ -1,5 +0,0 @@ -``ContourLabeler`` attributes -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -The ``labelFontProps``, ``labelFontSizeList``, and ``labelTextsList`` -attributes of `.ContourLabeler` have been deprecated. Use the ``labelTexts`` -attribute and the font properties of the corresponding text objects instead. diff --git a/doc/api/next_api_changes/deprecations/24198-AL.rst b/doc/api/next_api_changes/deprecations/24198-AL.rst deleted file mode 100644 index 574000883146..000000000000 --- a/doc/api/next_api_changes/deprecations/24198-AL.rst +++ /dev/null @@ -1,3 +0,0 @@ -``backend_ps.PsBackendHelper`` and ``backend_ps.ps_backend_helper`` -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -... are deprecated with no replacement. diff --git a/doc/api/next_api_changes/deprecations/24208-AL.rst b/doc/api/next_api_changes/deprecations/24208-AL.rst deleted file mode 100644 index f53bcde077c8..000000000000 --- a/doc/api/next_api_changes/deprecations/24208-AL.rst +++ /dev/null @@ -1,3 +0,0 @@ -``backend_webagg.ServerThread`` is deprecated -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -... with no replacement. diff --git a/doc/api/next_api_changes/deprecations/24220-AL.rst b/doc/api/next_api_changes/deprecations/24220-AL.rst deleted file mode 100644 index ff95f9b8ca52..000000000000 --- a/doc/api/next_api_changes/deprecations/24220-AL.rst +++ /dev/null @@ -1,5 +0,0 @@ -``parse_fontconfig_pattern`` will no longer ignore unknown constant names -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -Previously, in a fontconfig pattern like ``DejaVu Sans:foo``, the unknown -``foo`` constant name would be silently ignored. This now raises a warning, -and will become an error in the future. diff --git a/doc/api/next_api_changes/deprecations/24221-AL.rst b/doc/api/next_api_changes/deprecations/24221-AL.rst deleted file mode 100644 index 0e19e11a6f63..000000000000 --- a/doc/api/next_api_changes/deprecations/24221-AL.rst +++ /dev/null @@ -1,5 +0,0 @@ -``BufferRegion.to_string`` and ``BufferRegion.to_string_argb`` -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -... are deprecated. Use ``np.asarray(buffer_region)`` to get an array view on -a buffer region without making a copy; to convert that view from RGBA (the -default) to ARGB, use ``np.take(..., [2, 1, 0, 3], axis=2)``. diff --git a/doc/api/next_api_changes/deprecations/24224-OG.rst b/doc/api/next_api_changes/deprecations/24224-OG.rst deleted file mode 100644 index 9d06a3467a6a..000000000000 --- a/doc/api/next_api_changes/deprecations/24224-OG.rst +++ /dev/null @@ -1,5 +0,0 @@ -``num2julian``, ``julian2num`` and ``JULIAN_OFFSET`` -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -... of the `.dates` module are deprecated without replacements. These are -undocumented and not exported. If you rely on these, please make a local copy. diff --git a/doc/api/next_api_changes/deprecations/24240-OG.rst b/doc/api/next_api_changes/deprecations/24240-OG.rst deleted file mode 100644 index 8b1609d88b3d..000000000000 --- a/doc/api/next_api_changes/deprecations/24240-OG.rst +++ /dev/null @@ -1,6 +0,0 @@ -``unit_cube``, ``tunit_cube``, and ``tunit_edges`` -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -... of `.Axes3D` are deprecated without replacements. If you rely on them, -please copy the code of the corresponding private function (name starting -with ``_``). diff --git a/doc/api/next_api_changes/deprecations/24254-OG.rst b/doc/api/next_api_changes/deprecations/24254-OG.rst deleted file mode 100644 index d6e4882a774b..000000000000 --- a/doc/api/next_api_changes/deprecations/24254-OG.rst +++ /dev/null @@ -1,6 +0,0 @@ -Most arguments to widgets have been made keyword-only -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -Passing all but the very few first arguments positionally in the constructors -of Widgets is deprecated. Most arguments will become keyword-only in a future -version. diff --git a/doc/api/next_api_changes/deprecations/24305-AL.rst b/doc/api/next_api_changes/deprecations/24305-AL.rst deleted file mode 100644 index e08727f9cbf6..000000000000 --- a/doc/api/next_api_changes/deprecations/24305-AL.rst +++ /dev/null @@ -1,5 +0,0 @@ -``SimpleEvent`` -~~~~~~~~~~~~~~~ -The ``SimpleEvent`` nested class (previously accessible via the public -subclasses of ``ConnectionStyle._Base``, such as `.ConnectionStyle.Arc`, has -been deprecated. diff --git a/doc/api/next_api_changes/deprecations/24455-AL.rst b/doc/api/next_api_changes/deprecations/24455-AL.rst deleted file mode 100644 index 8a8f3e497260..000000000000 --- a/doc/api/next_api_changes/deprecations/24455-AL.rst +++ /dev/null @@ -1,3 +0,0 @@ -``RadioButtons.circles`` -~~~~~~~~~~~~~~~~~~~~~~~~ -... is deprecated. (RadioButtons now draws itself using `~.Axes.scatter`.) diff --git a/doc/api/next_api_changes/deprecations/24465-AL.rst b/doc/api/next_api_changes/deprecations/24465-AL.rst deleted file mode 100644 index 95acc8e2cb46..000000000000 --- a/doc/api/next_api_changes/deprecations/24465-AL.rst +++ /dev/null @@ -1,10 +0,0 @@ -``OffsetBox.get_extent_offsets`` and ``OffsetBox.get_extent`` -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -... are deprecated; these methods are also deprecated on all subclasses of -`.OffsetBox`. - -To get the offsetbox extents, instead of ``get_extent``, use -`.OffsetBox.get_bbox`, which directly returns a `.Bbox` instance. - -To also get the child offsets, instead of ``get_extent_offsets``, separately -call `~.OffsetBox.get_offset` on each children after triggering a draw. diff --git a/doc/api/next_api_changes/deprecations/24474_CM.rst b/doc/api/next_api_changes/deprecations/24474_CM.rst deleted file mode 100644 index 7e12ded0fdbf..000000000000 --- a/doc/api/next_api_changes/deprecations/24474_CM.rst +++ /dev/null @@ -1,4 +0,0 @@ -``CheckButtons.rectangles`` and ``CheckButtons.lines`` -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -``CheckButtons.rectangles`` and ``CheckButtons.lines`` are deprecated. -(``CheckButtons`` now draws itself using `~.Axes.scatter`.) diff --git a/doc/api/next_api_changes/deprecations/24538-OG.rst b/doc/api/next_api_changes/deprecations/24538-OG.rst deleted file mode 100644 index a587dd82c09a..000000000000 --- a/doc/api/next_api_changes/deprecations/24538-OG.rst +++ /dev/null @@ -1,4 +0,0 @@ -``legend.legendHandles`` -~~~~~~~~~~~~~~~~~~~~~~~~ - -... was undocumented and has been renamed to ``legend_handles``. Using ``legendHandles`` is deprecated. diff --git a/doc/api/next_api_changes/deprecations/24577-AL.rst b/doc/api/next_api_changes/deprecations/24577-AL.rst deleted file mode 100644 index 68c80a4310ef..000000000000 --- a/doc/api/next_api_changes/deprecations/24577-AL.rst +++ /dev/null @@ -1,2 +0,0 @@ -``ticklabels`` parameter of `.Axis.set_ticklabels` renamed to ``labels`` -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/doc/api/next_api_changes/deprecations/24664-OG.rst b/doc/api/next_api_changes/deprecations/24664-OG.rst deleted file mode 100644 index b40f4e9f6d6e..000000000000 --- a/doc/api/next_api_changes/deprecations/24664-OG.rst +++ /dev/null @@ -1,5 +0,0 @@ -``offsetbox.bbox_artist`` -~~~~~~~~~~~~~~~~~~~~~~~~~ - -... is deprecated. This is just a wrapper to call `.patches.bbox_artist` if a -flag is set in the file, so use that directly if you need the behavior. diff --git a/doc/api/next_api_changes/deprecations/24688-OG.rst b/doc/api/next_api_changes/deprecations/24688-OG.rst deleted file mode 100644 index 12bed4f04e52..000000000000 --- a/doc/api/next_api_changes/deprecations/24688-OG.rst +++ /dev/null @@ -1,5 +0,0 @@ -``Quiver.quiver_doc`` and ``Barbs.barbs_doc`` -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -... are deprecated. These are the doc-string and should not be accessible as -a named class member. diff --git a/doc/api/next_api_changes/deprecations/24730-TH.rst b/doc/api/next_api_changes/deprecations/24730-TH.rst deleted file mode 100644 index 0edb329e7bc6..000000000000 --- a/doc/api/next_api_changes/deprecations/24730-TH.rst +++ /dev/null @@ -1,24 +0,0 @@ -rcParams type -~~~~~~~~~~~~~ -Relying on ``rcParams`` being a ``dict`` subclass is deprecated. - -Nothing will change for regular users because ``rcParams`` will continue to -be dict-like (technically fulfill the ``MutableMapping`` interface). - -The `.RcParams` class does validation checking on calls to -``.RcParams.__getitem__`` and ``.RcParams.__setitem__``. However, there are rare -cases where we want to circumvent the validation logic and directly access the -underlying data values. Previously, this could be accomplished via a call to -the parent methods ``dict.__getitem__(rcParams, key)`` and -``dict.__setitem__(rcParams, key, val)``. - -Matplotlib 3.7 introduces ``rcParams._set(key, val)`` and -``rcParams._get(key)`` as a replacement to calling the parent methods. They are -intentionally marked private to discourage external use; However, if direct -`.RcParams` data access is needed, please switch from the dict functions to the -new ``_get()`` and ``_set()``. Even though marked private, we guarantee API -stability for these methods and they are subject to Matplotlib's API and -deprecation policy. - -Please notify the Matplotlib developers if you rely on ``rcParams`` being a -dict subclass in any other way, for which there is no migration path yet. diff --git a/doc/api/next_api_changes/deprecations/24806-KS.rst b/doc/api/next_api_changes/deprecations/24806-KS.rst deleted file mode 100644 index 4d7b1d75249b..000000000000 --- a/doc/api/next_api_changes/deprecations/24806-KS.rst +++ /dev/null @@ -1,4 +0,0 @@ -Deprecate unused parameter *x* to ``TextBox.begin_typing`` -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -This parameter was unused in the method, but was a required argument. diff --git a/doc/api/next_api_changes/deprecations/24846-ES.rst b/doc/api/next_api_changes/deprecations/24846-ES.rst deleted file mode 100644 index c70168706afb..000000000000 --- a/doc/api/next_api_changes/deprecations/24846-ES.rst +++ /dev/null @@ -1,30 +0,0 @@ -Deprecation of top-level cmap registration and access functions in ``mpl.cm`` -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -As part of a `multi-step process -`_ we are refactoring -the global state for managing the registered colormaps. - -In Matplotlib 3.5 we added a `.ColormapRegistry` class and exposed an instance -at the top level as ``matplotlib.colormaps``. The existing top level functions -in `matplotlib.cm` (``get_cmap``, ``register_cmap``, ``unregister_cmap``) were -changed to be aliases around the same instance. In Matplotlib 3.6 we have -marked those top level functions as pending deprecation. - -In Matplotlib 3.7, the following functions have been marked for deprecation: - -- ``matplotlib.cm.get_cmap``; use ``matplotlib.colormaps[name]`` instead if you - have a `str`. - - **Added 3.6.1** Use `matplotlib.cm.ColormapRegistry.get_cmap` if you - have a string, `None` or a `matplotlib.colors.Colormap` object that you want - to convert to a `matplotlib.colors.Colormap` instance. -- ``matplotlib.cm.register_cmap``; use `matplotlib.colormaps.register - <.ColormapRegistry.register>` instead -- ``matplotlib.cm.unregister_cmap``; use `matplotlib.colormaps.unregister - <.ColormapRegistry.unregister>` instead -- ``matplotlib.pyplot.register_cmap``; use `matplotlib.colormaps.register - <.ColormapRegistry.register>` instead - -The `matplotlib.pyplot.get_cmap` function will stay available for backward -compatibility. diff --git a/doc/api/next_api_changes/deprecations/24864-AL.rst b/doc/api/next_api_changes/deprecations/24864-AL.rst deleted file mode 100644 index bdeba7a85e65..000000000000 --- a/doc/api/next_api_changes/deprecations/24864-AL.rst +++ /dev/null @@ -1,10 +0,0 @@ -``BrokenBarHCollection`` is deprecated -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -It was just a thin wrapper inheriting from `.PolyCollection`; -`~.Axes.broken_barh` has now been changed to return a `.PolyCollection` -instead. - -The ``BrokenBarHCollection.span_where`` helper is likewise deprecated; for the -duration of the deprecation it has been moved to the parent `.PolyCollection` -class. Use `~.Axes.fill_between` as a replacement; see -:doc:`/gallery/lines_bars_and_markers/span_regions` for an example. diff --git a/doc/api/next_api_changes/deprecations/24904-AL.rst b/doc/api/next_api_changes/deprecations/24904-AL.rst deleted file mode 100644 index cbd04aadd3d8..000000000000 --- a/doc/api/next_api_changes/deprecations/24904-AL.rst +++ /dev/null @@ -1,4 +0,0 @@ -Passing inconsistent ``loc`` and ``nth_coord`` to axisartist helpers -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -Trying to construct for example a "top y-axis" or a "left x-axis" is now -deprecated. diff --git a/doc/api/next_api_changes/deprecations/25196-EP.rst b/doc/api/next_api_changes/deprecations/25196-EP.rst deleted file mode 100644 index 99f55401976d..000000000000 --- a/doc/api/next_api_changes/deprecations/25196-EP.rst +++ /dev/null @@ -1,4 +0,0 @@ -``Line2D`` -~~~~~~~~~~ -When creating a Line2D or using `.Line2D.set_xdata` and `.Line2D.set_ydata`, -passing x/y data as non sequence is deprecated. diff --git a/doc/api/next_api_changes/development/23683-AL.rst b/doc/api/next_api_changes/development/23683-AL.rst deleted file mode 100644 index fe3fab885f1a..000000000000 --- a/doc/api/next_api_changes/development/23683-AL.rst +++ /dev/null @@ -1,2 +0,0 @@ -pyparsing>=2.3.1 is now required -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/doc/api/next_api_changes/development/24257-AL.rst b/doc/api/next_api_changes/development/24257-AL.rst deleted file mode 100644 index 584420df8fd7..000000000000 --- a/doc/api/next_api_changes/development/24257-AL.rst +++ /dev/null @@ -1,2 +0,0 @@ -importlib_resources>=2.3.0 is now required on Python<3.10 -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/doc/api/next_api_changes/development/24710-AL.rst b/doc/api/next_api_changes/development/24710-AL.rst deleted file mode 100644 index 2f26f494a1ed..000000000000 --- a/doc/api/next_api_changes/development/24710-AL.rst +++ /dev/null @@ -1,4 +0,0 @@ -Support for Qt<5.10 has been dropped -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -... as there are no wheels or conda packages that support both Qt 5.9 (or -older) and Python 3.8 (or newer). diff --git a/doc/api/next_api_changes/development/24724-ES.rst b/doc/api/next_api_changes/development/24724-ES.rst deleted file mode 100644 index 5a4f992174d6..000000000000 --- a/doc/api/next_api_changes/development/24724-ES.rst +++ /dev/null @@ -1,5 +0,0 @@ -Windows wheel runtime bundling -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -Wheels built for Windows now bundle the MSVC runtime DLL ``msvcp140.dll``. This -enables importing Matplotlib on systems that do not have the runtime installed. diff --git a/doc/api/next_api_changes/development/24887-OG.rst b/doc/api/next_api_changes/development/24887-OG.rst deleted file mode 100644 index 22adf3937e7b..000000000000 --- a/doc/api/next_api_changes/development/24887-OG.rst +++ /dev/null @@ -1,2 +0,0 @@ -numpy>=1.20 is now required -~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/doc/api/next_api_changes/development/24893-KS.rst b/doc/api/next_api_changes/development/24893-KS.rst deleted file mode 100644 index 382f0c1c5cc1..000000000000 --- a/doc/api/next_api_changes/development/24893-KS.rst +++ /dev/null @@ -1,8 +0,0 @@ -Maximum line length increased to 88 characters -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -The maximum line length for new contributions has been extended from 79 characters to -88 characters. -This change provides an extra 9 characters to allow code which is a single idea to fit -on fewer lines (often a single line). -The chosen length is the same as `black `_. diff --git a/doc/api/next_api_changes/removals/21661-TAC.rst b/doc/api/next_api_changes/removals/21661-TAC.rst deleted file mode 100644 index 78c8837d6a8d..000000000000 --- a/doc/api/next_api_changes/removals/21661-TAC.rst +++ /dev/null @@ -1,12 +0,0 @@ -plot directive removals -~~~~~~~~~~~~~~~~~~~~~~~ - -The public methods: - -- ``matplotlib.sphinxext.split_code_at_show`` -- ``matplotlib.sphinxext.unescape_doctest`` -- ``matplotlib.sphinxext.run_code`` - -have been removed. - -The deprecated *encoding* option to the plot directive has been removed. diff --git a/doc/api/next_api_changes/removals/24125-OG.rst b/doc/api/next_api_changes/removals/24125-OG.rst deleted file mode 100644 index d6487090044a..000000000000 --- a/doc/api/next_api_changes/removals/24125-OG.rst +++ /dev/null @@ -1,68 +0,0 @@ -Miscellaneous removals -~~~~~~~~~~~~~~~~~~~~~~ - -- ``is_url`` and ``URL_REGEX`` are removed. (They were previously defined in - the toplevel :mod:`matplotlib` module.) -- The ``ArrowStyle.beginarrow`` and ``ArrowStyle.endarrow`` attributes are - removed; use the ``arrow`` attribute to define the desired heads and tails - of the arrow. -- ``backend_pgf.LatexManager.str_cache`` is removed. -- ``backends.qt_compat.ETS`` and ``backends.qt_compat.QT_RC_MAJOR_VERSION`` are - removed, with no replacement. -- The ``blocking_input`` module is removed. Instead, use - ``canvas.start_event_loop()`` and ``canvas.stop_event_loop()`` while - connecting event callbacks as needed. -- ``cbook.report_memory`` is removed; use ``psutil.virtual_memory`` instead. -- ``cm.LUTSIZE`` is removed. Use :rc:`image.lut` instead. This value only - affects colormap quantization levels for default colormaps generated at - module import time. -- ``Colorbar.patch`` is removed; this attribute was not correctly updated - anymore. -- ``ContourLabeler.get_label_width`` is removed. -- ``Dvi.baseline`` is removed (with no replacement). -- The *format* parameter of ``dviread.find_tex_file`` is removed (with no - replacement). -- ``FancyArrowPatch.get_path_in_displaycoord`` and - ``ConnectionPath.get_path_in_displaycoord`` are removed. The path in - display coordinates can still be obtained, as for other patches, using - ``patch.get_transform().transform_path(patch.get_path())``. -- The ``font_manager.win32InstalledFonts`` and - ``font_manager.get_fontconfig_fonts`` helper functions are removed. -- All parameters of ``imshow`` starting from *aspect* are keyword-only. -- ``QuadMesh.convert_mesh_to_paths`` and ``QuadMesh.convert_mesh_to_triangles`` - are removed. ``QuadMesh.get_paths()`` can be used as an alternative for the - former; there is no replacement for the latter. -- ``ScalarMappable.callbacksSM`` is removed. Use - ``ScalarMappable.callbacks`` instead. -- ``streamplot.get_integrator`` is removed. -- ``style.core.STYLE_FILE_PATTERN``, ``style.core.load_base_library``, and - ``style.core.iter_user_libraries`` are removed. -- ``SubplotParams.validate`` is removed. Use `.SubplotParams.update` to - change `.SubplotParams` while always keeping it in a valid state. -- The ``grey_arrayd``, ``font_family``, ``font_families``, and ``font_info`` - attributes of `.TexManager` are removed. -- ``Text.get_prop_tup`` is removed with no replacements (because the `.Text` - class cannot know whether a backend needs to update cache e.g. when the - text's color changes). -- ``Tick.apply_tickdir`` didn't actually update the tick markers on the - existing Line2D objects used to draw the ticks and is removed; use - `.Axis.set_tick_params` instead. -- ``tight_layout.auto_adjust_subplotpars`` is removed. -- The ``grid_info`` attribute of ``axisartist`` classes has been removed. -- ``axes_grid1.axes_grid.CbarAxes`` and ``axisartist.axes_grid.CbarAxes`` are - removed (they are now dynamically generated based on the owning axes - class). -- The ``axes_grid1.Divider.get_vsize_hsize`` and - ``axes_grid1.Grid.get_vsize_hsize`` methods are removed. -- ``AxesDivider.append_axes(..., add_to_figure=False)`` is removed. Use - ``ax.remove()`` to remove the Axes from the figure if needed. -- ``FixedAxisArtistHelper.change_tick_coord`` is removed with no - replacement. -- ``floating_axes.GridHelperCurveLinear.get_boundary`` is removed with no - replacement. -- ``ParasiteAxesBase.get_images_artists`` is removed. -- The "units finalize" signal (previously emitted by Axis instances) is - removed. Connect to "units" instead. -- Passing formatting parameters positionally to ``stem()`` is no longer - possible. -- ``axisartist.clip_path`` is removed with no replacement. diff --git a/doc/api/next_api_changes/removals/24128-OG.rst b/doc/api/next_api_changes/removals/24128-OG.rst deleted file mode 100644 index 2a17a6c54689..000000000000 --- a/doc/api/next_api_changes/removals/24128-OG.rst +++ /dev/null @@ -1,17 +0,0 @@ -``epoch2num`` and ``num2epoch`` are removed -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -These methods convert from unix timestamps to matplotlib floats, but are not -used internally to Matplotlib, and should not be needed by end users. To -convert a unix timestamp to datetime, simply use -`datetime.datetime.utcfromtimestamp`, or to use NumPy `~numpy.datetime64` -``dt = np.datetime64(e*1e6, 'us')``. - - -Locator and Formatter wrapper methods -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -The ``set_view_interval``, ``set_data_interval`` and ``set_bounds`` methods of -`.Locator`\s and `.Formatter`\s (and their common base class, TickHelper) are -removed. Directly manipulate the view and data intervals on the underlying -axis instead. diff --git a/doc/api/next_api_changes/removals/24129-OG.rst b/doc/api/next_api_changes/removals/24129-OG.rst deleted file mode 100644 index 28894274263d..000000000000 --- a/doc/api/next_api_changes/removals/24129-OG.rst +++ /dev/null @@ -1,33 +0,0 @@ -Interactive cursor details -~~~~~~~~~~~~~~~~~~~~~~~~~~ - -Setting a mouse cursor on a window has been moved from the toolbar to the -canvas. Consequently, several implementation details on toolbars and within -backends have been removed. - -``NavigationToolbar2.set_cursor`` and ``backend_tools.SetCursorBase.set_cursor`` -................................................................................ - -Instead, use the `.FigureCanvasBase.set_cursor` method on the canvas (available -as the ``canvas`` attribute on the toolbar or the Figure.) - -``backend_tools.SetCursorBase`` and subclasses -.............................................. - -``backend_tools.SetCursorBase`` was subclassed to provide backend-specific -implementations of ``set_cursor``. As that is now removed, the subclassing -is no longer necessary. Consequently, the following subclasses are also -removed: - -- ``matplotlib.backends.backend_gtk3.SetCursorGTK3`` -- ``matplotlib.backends.backend_qt5.SetCursorQt`` -- ``matplotlib.backends._backend_tk.SetCursorTk`` -- ``matplotlib.backends.backend_wx.SetCursorWx`` - -Instead, use the `.backend_tools.ToolSetCursor` class. - -``cursord`` in GTK and wx backends -.................................. - -The ``backend_gtk3.cursord`` and ``backend_wx.cursord`` dictionaries are -removed. This makes the GTK module importable on headless environments. diff --git a/doc/api/next_api_changes/removals/24251-OG.rst b/doc/api/next_api_changes/removals/24251-OG.rst deleted file mode 100644 index fbd095ab8912..000000000000 --- a/doc/api/next_api_changes/removals/24251-OG.rst +++ /dev/null @@ -1,4 +0,0 @@ -``auto_add_to_figure=True`` for ``Axes3D`` -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -... is no longer supported. Instead use ``fig.add_axes(ax)``. diff --git a/doc/api/next_api_changes/removals/24253-OG.rst b/doc/api/next_api_changes/removals/24253-OG.rst deleted file mode 100644 index 0c80d33f79a7..000000000000 --- a/doc/api/next_api_changes/removals/24253-OG.rst +++ /dev/null @@ -1,5 +0,0 @@ -The first parameter of ``Axes.grid`` and ``Axis.grid`` has been renamed to *visible* -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -The parameter was previously named *b*. This name change only matters if that -parameter was passed using a keyword argument, e.g. ``grid(b=False)``. diff --git a/doc/api/next_api_changes/removals/24254-OG.rst b/doc/api/next_api_changes/removals/24254-OG.rst deleted file mode 100644 index f29d1e0662cd..000000000000 --- a/doc/api/next_api_changes/removals/24254-OG.rst +++ /dev/null @@ -1,64 +0,0 @@ -Removal of deprecations in the Selector widget API -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -RectangleSelector and EllipseSelector -..................................... - -The *drawtype* keyword argument to `~matplotlib.widgets.RectangleSelector` is -removed. From now on, the only behaviour will be ``drawtype='box'``. - -Support for ``drawtype=line`` is removed altogether. As a -result, the *lineprops* keyword argument to -`~matplotlib.widgets.RectangleSelector` is also removed. - -To retain the behaviour of ``drawtype='none'``, use ``rectprops={'visible': -False}`` to make the drawn `~matplotlib.patches.Rectangle` invisible. - -Cleaned up attributes and arguments are: - -- The ``active_handle`` attribute has been privatized and removed. -- The ``drawtype`` attribute has been privatized and removed. -- The ``eventpress`` attribute has been privatized and removed. -- The ``eventrelease`` attribute has been privatized and removed. -- The ``interactive`` attribute has been privatized and removed. -- The *marker_props* argument is removed, use *handle_props* instead. -- The *maxdist* argument is removed, use *grab_range* instead. -- The *rectprops* argument is removed, use *props* instead. -- The ``rectprops`` attribute has been privatized and removed. -- The ``state`` attribute has been privatized and removed. -- The ``to_draw`` attribute has been privatized and removed. - -PolygonSelector -............... - -- The *line* attribute is removed. If you want to change the selector artist - properties, use the ``set_props`` or ``set_handle_props`` methods. -- The *lineprops* argument is removed, use *props* instead. -- The *markerprops* argument is removed, use *handle_props* instead. -- The *maxdist* argument and attribute is removed, use *grab_range* instead. -- The *vertex_select_radius* argument and attribute is removed, use - *grab_range* instead. - -SpanSelector -............ - -- The ``active_handle`` attribute has been privatized and removed. -- The ``eventpress`` attribute has been privatized and removed. -- The ``eventrelease`` attribute has been privatized and removed. -- The ``pressv`` attribute has been privatized and removed. -- The ``prev`` attribute has been privatized and removed. -- The ``rect`` attribute has been privatized and removed. -- The *rectprops* parameter has been renamed to *props*. -- The ``rectprops`` attribute has been privatized and removed. -- The *span_stays* parameter has been renamed to *interactive*. -- The ``span_stays`` attribute has been privatized and removed. -- The ``state`` attribute has been privatized and removed. - -LassoSelector -............. - -- The *lineprops* argument is removed, use *props* instead. -- The ``onpress`` and ``onrelease`` methods are removed. They are straight - aliases for ``press`` and ``release``. -- The ``matplotlib.widgets.TextBox.DIST_FROM_LEFT`` attribute has been - removed. It was marked as private in 3.5. diff --git a/doc/api/next_api_changes/removals/24257-AL.rst b/doc/api/next_api_changes/removals/24257-AL.rst deleted file mode 100644 index 490519c2c650..000000000000 --- a/doc/api/next_api_changes/removals/24257-AL.rst +++ /dev/null @@ -1,4 +0,0 @@ -``backend_template.show`` -~~~~~~~~~~~~~~~~~~~~~~~~~ -... has been removed, in order to better demonstrate the new backend definition -API. diff --git a/doc/api/next_api_changes/removals/24355-OG.rst b/doc/api/next_api_changes/removals/24355-OG.rst deleted file mode 100644 index 305abcd6d074..000000000000 --- a/doc/api/next_api_changes/removals/24355-OG.rst +++ /dev/null @@ -1,6 +0,0 @@ -Unused positional parameters to ``print_`` methods -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -None of the ``print_`` methods implemented by canvas subclasses used -positional arguments other that the first (the output filename or file-like), -so these extra parameters are removed. diff --git a/doc/api/next_api_changes/removals/24356-OG.rst b/doc/api/next_api_changes/removals/24356-OG.rst deleted file mode 100644 index a69256f9aca2..000000000000 --- a/doc/api/next_api_changes/removals/24356-OG.rst +++ /dev/null @@ -1,19 +0,0 @@ -``QuadMesh`` signature -~~~~~~~~~~~~~~~~~~~~~~ - -The `.QuadMesh` signature :: - - def __init__(meshWidth, meshHeight, coordinates, - antialiased=True, shading='flat', **kwargs) - -is removed and replaced by the new signature :: - - def __init__(coordinates, *, antialiased=True, shading='flat', **kwargs) - -In particular: - -- The *coordinates* argument must now be a (M, N, 2) array-like. Previously, - the grid shape was separately specified as (*meshHeight* + 1, *meshWidth* + - 1) and *coordinates* could be an array-like of any shape with M * N * 2 - elements. -- All parameters except *coordinates* are keyword-only now. diff --git a/doc/api/next_api_changes/removals/24624-AL.rst b/doc/api/next_api_changes/removals/24624-AL.rst deleted file mode 100644 index d79db9d2ae5b..000000000000 --- a/doc/api/next_api_changes/removals/24624-AL.rst +++ /dev/null @@ -1,10 +0,0 @@ -Expiration of ``FancyBboxPatch`` deprecations -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -The `.FancyBboxPatch` constructor no longer accepts the *bbox_transmuter* -parameter, nor can the *boxstyle* parameter be set to "custom" -- instead, -directly set *boxstyle* to the relevant boxstyle instance. The -*mutation_scale* and *mutation_aspect* parameters have also become -keyword-only. - -The *mutation_aspect* parameter is now handled internally and no longer passed -to the boxstyle callables when mutating the patch path. diff --git a/doc/api/next_api_changes/removals/24948-ES.rst b/doc/api/next_api_changes/removals/24948-ES.rst deleted file mode 100644 index 38ed70792f26..000000000000 --- a/doc/api/next_api_changes/removals/24948-ES.rst +++ /dev/null @@ -1,115 +0,0 @@ - -Testing support -~~~~~~~~~~~~~~~ - -``matplotlib.test()`` has been removed -...................................... - -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 :ref:`testing` for more details. - - - -Auto-removal of grids by `~.Axes.pcolor` and `~.Axes.pcolormesh` -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -`~.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. - - - -Modification of ``Axes`` children sublists -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -See :ref:`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. - -Passing incorrect types to ``Axes.add_*`` methods -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -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` - - -``ConversionInterface.convert`` no longer accepts unitless values -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -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. - - -Normal list of `.Artist` objects now returned by `.HandlerLine2D.create_artists` -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -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 will no longer cast inputs to str -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -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. - - - -Case-insensitive scales -~~~~~~~~~~~~~~~~~~~~~~~ - -Previously, scales could be set case-insensitively (e.g., -``set_xscale("LoG")``). Now all builtin scales use lowercase names. - - - -Support for ``nx1 = None`` or ``ny1 = None`` in ``AxesLocator`` and ``Divider.locate`` -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -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, )``). The user-facing -`.Divider.new_locator` API is unaffected -- it correctly normalizes ``nx1 = -None`` and ``ny1 = None`` as needed. - - -change signature of ``.FigureCanvasBase.enter_notify_event`` -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -The *xy* parameter is now required and keyword only. This was deprecated in -3.0 and originally slated to be removed in 3.5. diff --git a/doc/api/next_api_changes/removals/24965-ES.rst b/doc/api/next_api_changes/removals/24965-ES.rst deleted file mode 100644 index 96089f463e64..000000000000 --- a/doc/api/next_api_changes/removals/24965-ES.rst +++ /dev/null @@ -1,5 +0,0 @@ -``Colorbar`` tick update parameters -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -The *update_ticks* parameter of `.Colorbar.set_ticks` and -`.Colorbar.set_ticklabels` was ignored since 3.5 and has been removed. diff --git a/doc/api/prev_api_changes/api_changes_3.7.0.rst b/doc/api/prev_api_changes/api_changes_3.7.0.rst new file mode 100644 index 000000000000..932a4ba34452 --- /dev/null +++ b/doc/api/prev_api_changes/api_changes_3.7.0.rst @@ -0,0 +1,14 @@ +API Changes for 3.7.0 +===================== + +.. contents:: + :local: + :depth: 1 + +.. include:: /api/prev_api_changes/api_changes_3.7.0/behaviour.rst + +.. include:: /api/prev_api_changes/api_changes_3.7.0/deprecations.rst + +.. include:: /api/prev_api_changes/api_changes_3.7.0/removals.rst + +.. include:: /api/prev_api_changes/api_changes_3.7.0/development.rst diff --git a/doc/api/prev_api_changes/api_changes_3.7.0/behaviour.rst b/doc/api/prev_api_changes/api_changes_3.7.0/behaviour.rst new file mode 100644 index 000000000000..6057bfa9af4c --- /dev/null +++ b/doc/api/prev_api_changes/api_changes_3.7.0/behaviour.rst @@ -0,0 +1,136 @@ +Behaviour Changes +----------------- + +All Axes have ``get_subplotspec`` and ``get_gridspec`` methods now, which returns None for Axes not positioned via a gridspec +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Previously, this method was only present for Axes positioned via a gridspec. +Following this change, checking ``hasattr(ax, "get_gridspec")`` should now be +replaced by ``ax.get_gridspec() is not None``. For compatibility with older +Matplotlib releases, one can also check +``hasattr(ax, "get_gridspec") and ax.get_gridspec() is not None``. + +``HostAxesBase.get_aux_axes`` now defaults to using the same base axes class as the host axes +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +If using an ``mpl_toolkits.axisartist``-based host Axes, the parasite Axes will +also be based on ``mpl_toolkits.axisartist``. This behavior is consistent with +``HostAxesBase.twin``, ``HostAxesBase.twinx``, and ``HostAxesBase.twiny``. + +``plt.get_cmap`` and ``matplotlib.cm.get_cmap`` return a copy +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Formerly, `~.pyplot.get_cmap` and `.cm.get_cmap` returned a global version of a +`.Colormap`. This was prone to errors as modification of the colormap would +propagate from one location to another without warning. Now, a new copy of the +colormap is returned. + +``TrapezoidMapTriFinder`` uses different random number generator +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +The random number generator used to determine the order of insertion of +triangle edges in ``TrapezoidMapTriFinder`` has changed. This can result in a +different triangle index being returned for a point that lies exactly on an +edge between two triangles. This can also affect triangulation interpolation +and refinement algorithms that use ``TrapezoidMapTriFinder``. + +``FuncAnimation(save_count=None)`` +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Passing ``save_count=None`` to `.FuncAnimation` no longer limits the number +of frames to 100. Make sure that it either can be inferred from *frames* +or provide an integer *save_count*. + +``CenteredNorm`` halfrange is not modified when vcenter changes +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Previously, the **halfrange** would expand in proportion to the +amount that **vcenter** was moved away from either **vmin** or **vmax**. +Now, the halfrange remains fixed when vcenter is changed, and **vmin** and +**vmax** are updated based on the **vcenter** and **halfrange** values. + +For example, this is what the values were when changing vcenter previously. + +.. code-block:: + + norm = CenteredNorm(vcenter=0, halfrange=1) + # Move vcenter up by one + norm.vcenter = 1 + # updates halfrange and vmax (vmin stays the same) + # norm.halfrange == 2, vmin == -1, vmax == 3 + +and now, with that same example + +.. code-block:: + + norm = CenteredNorm(vcenter=0, halfrange=1) + norm.vcenter = 1 + # updates vmin and vmax (halfrange stays the same) + # norm.halfrange == 1, vmin == 0, vmax == 2 + +The **halfrange** can be set manually or ``norm.autoscale()`` +can be used to automatically set the limits after setting **vcenter**. + +``fig.subplot_mosaic`` no longer passes the ``gridspec_kw`` args to nested gridspecs. +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +For nested `.Figure.subplot_mosaic` layouts, it is almost always +inappropriate for *gridspec_kw* arguments to be passed to lower nest +levels, and these arguments are incompatible with the lower levels in +many cases. This dictionary is no longer passed to the inner +layouts. Users who need to modify *gridspec_kw* at multiple levels +should use `.Figure.subfigures` to get nesting, and construct the +inner layouts with `.Figure.subplots` or `.Figure.subplot_mosaic`. + +``HPacker`` alignment with **bottom** or **top** are now correct +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Previously, the **bottom** and **top** alignments were swapped. +This has been corrected so that the alignments correspond appropriately. + +On Windows only fonts known to the registry will be discovered +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Previously, Matplotlib would recursively walk user and system font directories +to discover fonts, however this lead to a number of undesirable behaviors +including finding deleted fonts. Now Matplotlib will only find fonts that are +known to the Windows registry. + +This means that any user installed fonts must go through the Windows font +installer rather than simply being copied to the correct folder. + +This only impacts the set of fonts Matplotlib will consider when using +`matplotlib.font_manager.findfont`. To use an arbitrary font, directly pass the +path to a font as shown in +:doc:`/gallery/text_labels_and_annotations/font_file`. + +``QuadMesh.set_array`` now always raises ``ValueError`` for inputs with incorrect shapes +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +It could previously also raise `TypeError` in some cases. + +``contour`` and ``contourf`` auto-select suitable levels when given boolean inputs +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +If the height array given to `.Axes.contour` or `.Axes.contourf` is of bool +dtype and *levels* is not specified, *levels* now defaults to ``[0.5]`` for +`~.Axes.contour` and ``[0, 0.5, 1]`` for `.Axes.contourf`. + +``contour`` no longer warns if no contour lines are drawn. +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +This can occur if the user explicitly passes a ``levels`` array with no values + +``AxesImage.set_extent`` now raises ``TypeError`` for unknown keyword arguments +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +It previously raised a `ValueError`. + +etween ``z.min()`` and ``z.max()``; or if ``z`` has the same value everywhere. + +Change of ``legend(loc="best")`` behavior +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +The algorithm of the auto-legend locator has been tweaked to better handle +non rectangular patches. Additional details on this change can be found in +:ghissue:`9580` and :ghissue:`9598`. diff --git a/doc/api/prev_api_changes/api_changes_3.7.0/deprecations.rst b/doc/api/prev_api_changes/api_changes_3.7.0/deprecations.rst new file mode 100644 index 000000000000..dd6d9d8e0894 --- /dev/null +++ b/doc/api/prev_api_changes/api_changes_3.7.0/deprecations.rst @@ -0,0 +1,291 @@ +Deprecations +------------ + +``Axes`` subclasses should override ``clear`` instead of ``cla`` +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +For clarity, `.axes.Axes.clear` is now preferred over `.Axes.cla`. However, for +backwards compatibility, the latter will remain as an alias for the former. + +For additional compatibility with third-party libraries, Matplotlib will +continue to call the ``cla`` method of any `~.axes.Axes` subclasses if they +define it. In the future, this will no longer occur, and Matplotlib will only +call the ``clear`` method in `~.axes.Axes` subclasses. + +It is recommended to define only the ``clear`` method when on Matplotlib 3.6, +and only ``cla`` for older versions. + +rcParams type +~~~~~~~~~~~~~ + +Relying on ``rcParams`` being a ``dict`` subclass is deprecated. + +Nothing will change for regular users because ``rcParams`` will continue to +be dict-like (technically fulfill the ``MutableMapping`` interface). + +The `.RcParams` class does validation checking on calls to +``.RcParams.__getitem__`` and ``.RcParams.__setitem__``. However, there are rare +cases where we want to circumvent the validation logic and directly access the +underlying data values. Previously, this could be accomplished via a call to +the parent methods ``dict.__getitem__(rcParams, key)`` and +``dict.__setitem__(rcParams, key, val)``. + +Matplotlib 3.7 introduces ``rcParams._set(key, val)`` and +``rcParams._get(key)`` as a replacement to calling the parent methods. They are +intentionally marked private to discourage external use; However, if direct +`.RcParams` data access is needed, please switch from the dict functions to the +new ``_get()`` and ``_set()``. Even though marked private, we guarantee API +stability for these methods and they are subject to Matplotlib's API and +deprecation policy. + +Please notify the Matplotlib developers if you rely on ``rcParams`` being a +dict subclass in any other way, for which there is no migration path yet. + +Deprecation aliases in cbook +~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +The module ``matplotlib.cbook.deprecation`` was previously deprecated in +Matplotlib 3.4, along with deprecation-related API in ``matplotlib.cbook``. Due +to technical issues, ``matplotlib.cbook.MatplotlibDeprecationWarning`` and +``matplotlib.cbook.mplDeprecation`` did not raise deprecation warnings on use. +Changes in Python have now made it possible to warn when these aliases are +being used. + +In order to avoid downstream breakage, these aliases will now warn, and their +removal has been pushed from 3.6 to 3.8 to give time to notice said warnings. +As replacement, please use `matplotlib.MatplotlibDeprecationWarning`. + +``draw_gouraud_triangle`` +~~~~~~~~~~~~~~~~~~~~~~~~~ + +... is deprecated as in most backends this is a redundant call. Use +`~.RendererBase.draw_gouraud_triangles` instead. A ``draw_gouraud_triangle`` +call in a custom `~matplotlib.artist.Artist` can readily be replaced as:: + + self.draw_gouraud_triangles(gc, points.reshape((1, 3, 2)), + colors.reshape((1, 3, 4)), trans) + +A `~.RendererBase.draw_gouraud_triangles` method can be implemented from an +existing ``draw_gouraud_triangle`` method as:: + + transform = transform.frozen() + for tri, col in zip(triangles_array, colors_array): + self.draw_gouraud_triangle(gc, tri, col, transform) + +``matplotlib.pyplot.get_plot_commands`` +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +... is a pending deprecation. This is considered internal and no end-user +should need it. + +``matplotlib.tri`` submodules are deprecated +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +The ``matplotlib.tri.*`` submodules are deprecated. All functionality is +available in ``matplotlib.tri`` directly and should be imported from there. + +Passing undefined *label_mode* to ``Grid`` +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +... is deprecated. This includes `mpl_toolkits.axes_grid1.axes_grid.Grid`, +`mpl_toolkits.axes_grid1.axes_grid.AxesGrid`, and +`mpl_toolkits.axes_grid1.axes_grid.ImageGrid` as well as the corresponding +classes imported from `mpl_toolkits.axisartist.axes_grid`. + +Pass ``label_mode='keep'`` instead to get the previous behavior of not modifying labels. + +Colorbars for orphaned mappables are deprecated, but no longer raise +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Before 3.6.0, Colorbars for mappables that do not have a parent axes would +steal space from the current Axes. 3.6.0 raised an error on this, but without +a deprecation cycle. For 3.6.1 this is reverted, the current axes is used, +but a deprecation warning is shown instead. In this undetermined case users +and libraries should explicitly specify what axes they want space to be stolen +from: ``fig.colorbar(mappable, ax=plt.gca())``. + +``Animation`` attributes +~~~~~~~~~~~~~~~~~~~~~~~~ + +The attributes ``repeat`` of `.TimedAnimation` and subclasses and +``save_count`` of `.FuncAnimation` are considered private and deprecated. + +``contour.ClabelText`` and ``ContourLabeler.set_label_props`` +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +... are deprecated. + +Use ``Text(..., transform_rotates_text=True)`` as a replacement for +``contour.ClabelText(...)`` and ``text.set(text=text, color=color, +fontproperties=labeler.labelFontProps, clip_box=labeler.axes.bbox)`` as a +replacement for the ``ContourLabeler.set_label_props(label, text, color)``. + +``ContourLabeler`` attributes +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +The ``labelFontProps``, ``labelFontSizeList``, and ``labelTextsList`` +attributes of `.ContourLabeler` have been deprecated. Use the ``labelTexts`` +attribute and the font properties of the corresponding text objects instead. + +``backend_ps.PsBackendHelper`` and ``backend_ps.ps_backend_helper`` +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +... are deprecated with no replacement. + +``backend_webagg.ServerThread`` is deprecated +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +... with no replacement. + +``parse_fontconfig_pattern`` will no longer ignore unknown constant names +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Previously, in a fontconfig pattern like ``DejaVu Sans:foo``, the unknown +``foo`` constant name would be silently ignored. This now raises a warning, +and will become an error in the future. + +``BufferRegion.to_string`` and ``BufferRegion.to_string_argb`` +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +... are deprecated. Use ``np.asarray(buffer_region)`` to get an array view on +a buffer region without making a copy; to convert that view from RGBA (the +default) to ARGB, use ``np.take(..., [2, 1, 0, 3], axis=2)``. + +``num2julian``, ``julian2num`` and ``JULIAN_OFFSET`` +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +... of the `.dates` module are deprecated without replacements. These are +undocumented and not exported. If you rely on these, please make a local copy. + +``unit_cube``, ``tunit_cube``, and ``tunit_edges`` +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +... of `.Axes3D` are deprecated without replacements. If you rely on them, +please copy the code of the corresponding private function (name starting +with ``_``). + +Most arguments to widgets have been made keyword-only +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Passing all but the very few first arguments positionally in the constructors +of Widgets is deprecated. Most arguments will become keyword-only in a future +version. + +``SimpleEvent`` +~~~~~~~~~~~~~~~ + +The ``SimpleEvent`` nested class (previously accessible via the public +subclasses of ``ConnectionStyle._Base``, such as `.ConnectionStyle.Arc`, has +been deprecated. + +``RadioButtons.circles`` +~~~~~~~~~~~~~~~~~~~~~~~~ + +... is deprecated. (RadioButtons now draws itself using `~.Axes.scatter`.) + +``CheckButtons.rectangles`` and ``CheckButtons.lines`` +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +``CheckButtons.rectangles`` and ``CheckButtons.lines`` are deprecated. +(``CheckButtons`` now draws itself using `~.Axes.scatter`.) + +``OffsetBox.get_extent_offsets`` and ``OffsetBox.get_extent`` +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +... are deprecated; these methods are also deprecated on all subclasses of +`.OffsetBox`. + +To get the offsetbox extents, instead of ``get_extent``, use +`.OffsetBox.get_bbox`, which directly returns a `.Bbox` instance. + +To also get the child offsets, instead of ``get_extent_offsets``, separately +call `~.OffsetBox.get_offset` on each children after triggering a draw. + +``legend.legendHandles`` +~~~~~~~~~~~~~~~~~~~~~~~~ + +... was undocumented and has been renamed to ``legend_handles``. Using ``legendHandles`` is deprecated. + +``ticklabels`` parameter of `.Axis.set_ticklabels` renamed to ``labels`` +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +``offsetbox.bbox_artist`` +~~~~~~~~~~~~~~~~~~~~~~~~~ + +... is deprecated. This is just a wrapper to call `.patches.bbox_artist` if a +flag is set in the file, so use that directly if you need the behavior. + +``Quiver.quiver_doc`` and ``Barbs.barbs_doc`` +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +... are deprecated. These are the doc-string and should not be accessible as +a named class member. + +Deprecate unused parameter *x* to ``TextBox.begin_typing`` +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +This parameter was unused in the method, but was a required argument. + +Deprecation of top-level cmap registration and access functions in ``mpl.cm`` +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +As part of a `multi-step process +`_ we are refactoring +the global state for managing the registered colormaps. + +In Matplotlib 3.5 we added a `.ColormapRegistry` class and exposed an instance +at the top level as ``matplotlib.colormaps``. The existing top level functions +in `matplotlib.cm` (``get_cmap``, ``register_cmap``, ``unregister_cmap``) were +changed to be aliases around the same instance. In Matplotlib 3.6 we have +marked those top level functions as pending deprecation. + +In Matplotlib 3.7, the following functions have been marked for deprecation: + +- ``matplotlib.cm.get_cmap``; use ``matplotlib.colormaps[name]`` instead if you + have a `str`. + + **Added 3.6.1** Use `matplotlib.cm.ColormapRegistry.get_cmap` if you + have a string, `None` or a `matplotlib.colors.Colormap` object that you want + to convert to a `matplotlib.colors.Colormap` instance. +- ``matplotlib.cm.register_cmap``; use `matplotlib.colormaps.register + <.ColormapRegistry.register>` instead +- ``matplotlib.cm.unregister_cmap``; use `matplotlib.colormaps.unregister + <.ColormapRegistry.unregister>` instead +- ``matplotlib.pyplot.register_cmap``; use `matplotlib.colormaps.register + <.ColormapRegistry.register>` instead + +The `matplotlib.pyplot.get_cmap` function will stay available for backward +compatibility. + +``BrokenBarHCollection`` is deprecated +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +It was just a thin wrapper inheriting from `.PolyCollection`; +`~.Axes.broken_barh` has now been changed to return a `.PolyCollection` +instead. + +The ``BrokenBarHCollection.span_where`` helper is likewise deprecated; for the +duration of the deprecation it has been moved to the parent `.PolyCollection` +class. Use `~.Axes.fill_between` as a replacement; see +:doc:`/gallery/lines_bars_and_markers/span_regions` for an example. + +Passing inconsistent ``loc`` and ``nth_coord`` to axisartist helpers +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Trying to construct for example a "top y-axis" or a "left x-axis" is now +deprecated. + +``passthru_pt`` +~~~~~~~~~~~~~~~ + +This attribute of ``AxisArtistHelper``\s is deprecated. + +``axes3d.vvec``, ``axes3d.eye``, ``axes3d.sx``, and ``axes3d.sy`` +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +... are deprecated without replacement. + +``Line2D`` +~~~~~~~~~~ + +When creating a Line2D or using `.Line2D.set_xdata` and `.Line2D.set_ydata`, +passing x/y data as non sequence is deprecated. diff --git a/doc/api/prev_api_changes/api_changes_3.7.0/development.rst b/doc/api/prev_api_changes/api_changes_3.7.0/development.rst new file mode 100644 index 000000000000..c2ae35970524 --- /dev/null +++ b/doc/api/prev_api_changes/api_changes_3.7.0/development.rst @@ -0,0 +1,49 @@ +Development changes +------------------- + + +Windows wheel runtime bundling +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Wheels built for Windows now bundle the MSVC runtime DLL ``msvcp140.dll``. This +enables importing Matplotlib on systems that do not have the runtime installed. + + +Increase to minimum supported versions of dependencies +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + + +For Matplotlib 3.7, the :ref:`minimum supported versions ` are +being bumped: + ++------------+-----------------+---------------+ +| Dependency | min in mpl3.6 | min in mpl3.7 | ++============+=================+===============+ +| NumPy | 1.19 | 1.20 | ++------------+-----------------+---------------+ +| pyparsing | 2.2.1 | 2.3.1 | ++------------+-----------------+---------------+ +| Qt | | 5.10 | ++------------+-----------------+---------------+ + +- There are no wheels or conda packages that support both Qt 5.9 (or older) and + Python 3.8 (or newer). + +This is consistent with our :ref:`min_deps_policy` and `NEP29 +`__ + + +New dependencies +~~~~~~~~~~~~~~~~ + +* `importlib-resources `_ + (>= 3.2.0; only required on Python < 3.10) + +Maximum line length increased to 88 characters +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +The maximum line length for new contributions has been extended from 79 characters to +88 characters. +This change provides an extra 9 characters to allow code which is a single idea to fit +on fewer lines (often a single line). +The chosen length is the same as `black `_. diff --git a/doc/api/prev_api_changes/api_changes_3.7.0/removals.rst b/doc/api/prev_api_changes/api_changes_3.7.0/removals.rst new file mode 100644 index 000000000000..c8f499666525 --- /dev/null +++ b/doc/api/prev_api_changes/api_changes_3.7.0/removals.rst @@ -0,0 +1,369 @@ +Removals +-------- + +``epoch2num`` and ``num2epoch`` are removed +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +These methods convert from unix timestamps to matplotlib floats, but are not +used internally to Matplotlib, and should not be needed by end users. To +convert a unix timestamp to datetime, simply use +`datetime.datetime.utcfromtimestamp`, or to use NumPy `~numpy.datetime64` +``dt = np.datetime64(e*1e6, 'us')``. + +Locator and Formatter wrapper methods +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +The ``set_view_interval``, ``set_data_interval`` and ``set_bounds`` methods of +`.Locator`\s and `.Formatter`\s (and their common base class, TickHelper) are +removed. Directly manipulate the view and data intervals on the underlying +axis instead. + +Interactive cursor details +~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Setting a mouse cursor on a window has been moved from the toolbar to the +canvas. Consequently, several implementation details on toolbars and within +backends have been removed. + +``NavigationToolbar2.set_cursor`` and ``backend_tools.SetCursorBase.set_cursor`` +................................................................................ + +Instead, use the `.FigureCanvasBase.set_cursor` method on the canvas (available +as the ``canvas`` attribute on the toolbar or the Figure.) + +``backend_tools.SetCursorBase`` and subclasses +.............................................. + +``backend_tools.SetCursorBase`` was subclassed to provide backend-specific +implementations of ``set_cursor``. As that is now removed, the subclassing +is no longer necessary. Consequently, the following subclasses are also +removed: + +- ``matplotlib.backends.backend_gtk3.SetCursorGTK3`` +- ``matplotlib.backends.backend_qt5.SetCursorQt`` +- ``matplotlib.backends._backend_tk.SetCursorTk`` +- ``matplotlib.backends.backend_wx.SetCursorWx`` + +Instead, use the `.backend_tools.ToolSetCursor` class. + +``cursord`` in GTK and wx backends +.................................. + +The ``backend_gtk3.cursord`` and ``backend_wx.cursord`` dictionaries are +removed. This makes the GTK module importable on headless environments. + +``auto_add_to_figure=True`` for ``Axes3D`` +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +... is no longer supported. Instead use ``fig.add_axes(ax)``. + +The first parameter of ``Axes.grid`` and ``Axis.grid`` has been renamed to *visible* +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +The parameter was previously named *b*. This name change only matters if that +parameter was passed using a keyword argument, e.g. ``grid(b=False)``. + +Removal of deprecations in the Selector widget API +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +RectangleSelector and EllipseSelector +..................................... + +The *drawtype* keyword argument to `~matplotlib.widgets.RectangleSelector` is +removed. From now on, the only behaviour will be ``drawtype='box'``. + +Support for ``drawtype=line`` is removed altogether. As a +result, the *lineprops* keyword argument to +`~matplotlib.widgets.RectangleSelector` is also removed. + +To retain the behaviour of ``drawtype='none'``, use ``rectprops={'visible': +False}`` to make the drawn `~matplotlib.patches.Rectangle` invisible. + +Cleaned up attributes and arguments are: + +- The ``active_handle`` attribute has been privatized and removed. +- The ``drawtype`` attribute has been privatized and removed. +- The ``eventpress`` attribute has been privatized and removed. +- The ``eventrelease`` attribute has been privatized and removed. +- The ``interactive`` attribute has been privatized and removed. +- The *marker_props* argument is removed, use *handle_props* instead. +- The *maxdist* argument is removed, use *grab_range* instead. +- The *rectprops* argument is removed, use *props* instead. +- The ``rectprops`` attribute has been privatized and removed. +- The ``state`` attribute has been privatized and removed. +- The ``to_draw`` attribute has been privatized and removed. + +PolygonSelector +............... + +- The *line* attribute is removed. If you want to change the selector artist + properties, use the ``set_props`` or ``set_handle_props`` methods. +- The *lineprops* argument is removed, use *props* instead. +- The *markerprops* argument is removed, use *handle_props* instead. +- The *maxdist* argument and attribute is removed, use *grab_range* instead. +- The *vertex_select_radius* argument and attribute is removed, use + *grab_range* instead. + +SpanSelector +............ + +- The ``active_handle`` attribute has been privatized and removed. +- The ``eventpress`` attribute has been privatized and removed. +- The ``eventrelease`` attribute has been privatized and removed. +- The ``pressv`` attribute has been privatized and removed. +- The ``prev`` attribute has been privatized and removed. +- The ``rect`` attribute has been privatized and removed. +- The *rectprops* parameter has been renamed to *props*. +- The ``rectprops`` attribute has been privatized and removed. +- The *span_stays* parameter has been renamed to *interactive*. +- The ``span_stays`` attribute has been privatized and removed. +- The ``state`` attribute has been privatized and removed. + +LassoSelector +............. + +- The *lineprops* argument is removed, use *props* instead. +- The ``onpress`` and ``onrelease`` methods are removed. They are straight + aliases for ``press`` and ``release``. +- The ``matplotlib.widgets.TextBox.DIST_FROM_LEFT`` attribute has been + removed. It was marked as private in 3.5. + +``backend_template.show`` +~~~~~~~~~~~~~~~~~~~~~~~~~ +... has been removed, in order to better demonstrate the new backend definition +API. + +Unused positional parameters to ``print_`` methods +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +None of the ``print_`` methods implemented by canvas subclasses used +positional arguments other that the first (the output filename or file-like), +so these extra parameters are removed. + +``QuadMesh`` signature +~~~~~~~~~~~~~~~~~~~~~~ + +The `.QuadMesh` signature :: + + def __init__(meshWidth, meshHeight, coordinates, + antialiased=True, shading='flat', **kwargs) + +is removed and replaced by the new signature :: + + def __init__(coordinates, *, antialiased=True, shading='flat', **kwargs) + +In particular: + +- The *coordinates* argument must now be a (M, N, 2) array-like. Previously, + the grid shape was separately specified as (*meshHeight* + 1, *meshWidth* + + 1) and *coordinates* could be an array-like of any shape with M * N * 2 + elements. +- All parameters except *coordinates* are keyword-only now. + +Expiration of ``FancyBboxPatch`` deprecations +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +The `.FancyBboxPatch` constructor no longer accepts the *bbox_transmuter* +parameter, nor can the *boxstyle* parameter be set to "custom" -- instead, +directly set *boxstyle* to the relevant boxstyle instance. The +*mutation_scale* and *mutation_aspect* parameters have also become +keyword-only. + +The *mutation_aspect* parameter is now handled internally and no longer passed +to the boxstyle callables when mutating the patch path. + +Testing support +~~~~~~~~~~~~~~~ + +``matplotlib.test()`` has been removed +...................................... + +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 :ref:`testing` for more details. + +Auto-removal of grids by `~.Axes.pcolor` and `~.Axes.pcolormesh` +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +`~.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. + +Modification of ``Axes`` children sublists +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +See :ref:`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. + +Passing incorrect types to ``Axes.add_*`` methods +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +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` + + +``ConversionInterface.convert`` no longer accepts unitless values +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +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. + + +Normal list of `.Artist` objects now returned by `.HandlerLine2D.create_artists` +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +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 will no longer cast inputs to str +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +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. + +Case-insensitive scales +~~~~~~~~~~~~~~~~~~~~~~~ + +Previously, scales could be set case-insensitively (e.g., +``set_xscale("LoG")``). Now all builtin scales use lowercase names. + +Support for ``nx1 = None`` or ``ny1 = None`` in ``AxesLocator`` and ``Divider.locate`` +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +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, )``). The user-facing +`.Divider.new_locator` API is unaffected -- it correctly normalizes ``nx1 = +None`` and ``ny1 = None`` as needed. + + +change signature of ``.FigureCanvasBase.enter_notify_event`` +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +The *xy* parameter is now required and keyword only. This was deprecated in +3.0 and originally slated to be removed in 3.5. + +``Colorbar`` tick update parameters +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +The *update_ticks* parameter of `.Colorbar.set_ticks` and +`.Colorbar.set_ticklabels` was ignored since 3.5 and has been removed. + +plot directive removals +~~~~~~~~~~~~~~~~~~~~~~~ + +The public methods: + +- ``matplotlib.sphinxext.split_code_at_show`` +- ``matplotlib.sphinxext.unescape_doctest`` +- ``matplotlib.sphinxext.run_code`` + +have been removed. + +The deprecated *encoding* option to the plot directive has been removed. + +Miscellaneous removals +~~~~~~~~~~~~~~~~~~~~~~ + +- ``is_url`` and ``URL_REGEX`` are removed. (They were previously defined in + the toplevel :mod:`matplotlib` module.) +- The ``ArrowStyle.beginarrow`` and ``ArrowStyle.endarrow`` attributes are + removed; use the ``arrow`` attribute to define the desired heads and tails + of the arrow. +- ``backend_pgf.LatexManager.str_cache`` is removed. +- ``backends.qt_compat.ETS`` and ``backends.qt_compat.QT_RC_MAJOR_VERSION`` are + removed, with no replacement. +- The ``blocking_input`` module is removed. Instead, use + ``canvas.start_event_loop()`` and ``canvas.stop_event_loop()`` while + connecting event callbacks as needed. +- ``cbook.report_memory`` is removed; use ``psutil.virtual_memory`` instead. +- ``cm.LUTSIZE`` is removed. Use :rc:`image.lut` instead. This value only + affects colormap quantization levels for default colormaps generated at + module import time. +- ``Colorbar.patch`` is removed; this attribute was not correctly updated + anymore. +- ``ContourLabeler.get_label_width`` is removed. +- ``Dvi.baseline`` is removed (with no replacement). +- The *format* parameter of ``dviread.find_tex_file`` is removed (with no + replacement). +- ``FancyArrowPatch.get_path_in_displaycoord`` and + ``ConnectionPath.get_path_in_displaycoord`` are removed. The path in + display coordinates can still be obtained, as for other patches, using + ``patch.get_transform().transform_path(patch.get_path())``. +- The ``font_manager.win32InstalledFonts`` and + ``font_manager.get_fontconfig_fonts`` helper functions are removed. +- All parameters of ``imshow`` starting from *aspect* are keyword-only. +- ``QuadMesh.convert_mesh_to_paths`` and ``QuadMesh.convert_mesh_to_triangles`` + are removed. ``QuadMesh.get_paths()`` can be used as an alternative for the + former; there is no replacement for the latter. +- ``ScalarMappable.callbacksSM`` is removed. Use + ``ScalarMappable.callbacks`` instead. +- ``streamplot.get_integrator`` is removed. +- ``style.core.STYLE_FILE_PATTERN``, ``style.core.load_base_library``, and + ``style.core.iter_user_libraries`` are removed. +- ``SubplotParams.validate`` is removed. Use `.SubplotParams.update` to + change `.SubplotParams` while always keeping it in a valid state. +- The ``grey_arrayd``, ``font_family``, ``font_families``, and ``font_info`` + attributes of `.TexManager` are removed. +- ``Text.get_prop_tup`` is removed with no replacements (because the `.Text` + class cannot know whether a backend needs to update cache e.g. when the + text's color changes). +- ``Tick.apply_tickdir`` didn't actually update the tick markers on the + existing Line2D objects used to draw the ticks and is removed; use + `.Axis.set_tick_params` instead. +- ``tight_layout.auto_adjust_subplotpars`` is removed. +- The ``grid_info`` attribute of ``axisartist`` classes has been removed. +- ``axes_grid1.axes_grid.CbarAxes`` and ``axisartist.axes_grid.CbarAxes`` are + removed (they are now dynamically generated based on the owning axes + class). +- The ``axes_grid1.Divider.get_vsize_hsize`` and + ``axes_grid1.Grid.get_vsize_hsize`` methods are removed. +- ``AxesDivider.append_axes(..., add_to_figure=False)`` is removed. Use + ``ax.remove()`` to remove the Axes from the figure if needed. +- ``FixedAxisArtistHelper.change_tick_coord`` is removed with no + replacement. +- ``floating_axes.GridHelperCurveLinear.get_boundary`` is removed with no + replacement. +- ``ParasiteAxesBase.get_images_artists`` is removed. +- The "units finalize" signal (previously emitted by Axis instances) is + removed. Connect to "units" instead. +- Passing formatting parameters positionally to ``stem()`` is no longer + possible. +- ``axisartist.clip_path`` is removed with no replacement. + diff --git a/doc/devel/development_setup.rst b/doc/devel/development_setup.rst index 5ce0898e0146..afcd63b3bf15 100644 --- a/doc/devel/development_setup.rst +++ b/doc/devel/development_setup.rst @@ -72,7 +72,7 @@ Change into this directory before continuing:: * `Git documentation `_ * `GitHub-Contributing to a Project `_ - * `Introduction to GitHub `_ + * `GitHub Skills `_ * :ref:`using-git` * :ref:`git-resources` * `Installing git `_ diff --git a/doc/devel/development_workflow.rst b/doc/devel/development_workflow.rst index 2635787f997c..cd902f3f30e5 100644 --- a/doc/devel/development_workflow.rst +++ b/doc/devel/development_workflow.rst @@ -130,15 +130,13 @@ In more detail ``git commit -am 'A commit message'``. Note the ``-am`` options to ``commit``. The ``m`` flag just signals that you're going to type a message on the command line. The ``a`` flag — you can just take on - faith — or see `why the -a flag?`_ — and the helpful use-case - description in the `tangled working copy problem`_. The + faith — or see `why the -a flag?`_. The `git commit `_ manual page might also be useful. #. To push the changes up to your forked repo on GitHub, do a ``git push``. .. _why the -a flag?: http://gitready.com/beginner/2009/01/18/the-staging-area.html -.. _tangled working copy problem: http://2ndscale.com/rtomayko/2008/the-thing-about-git Open a pull request diff --git a/doc/index.rst b/doc/index.rst index fc911ea12296..1c608c0d62cb 100644 --- a/doc/index.rst +++ b/doc/index.rst @@ -51,7 +51,7 @@ Learning resources - :doc:`Quick-start guide ` - :doc:`Plot types ` - - `Introductory tutorials <../tutorials/index.html#introductory>`_ + - :ref:`Introductory tutorials ` - :doc:`External learning resources ` .. grid-item-card:: diff --git a/doc/users/explain/figures.rst b/doc/users/explain/figures.rst index a26f10712fe0..f5fb3142d297 100644 --- a/doc/users/explain/figures.rst +++ b/doc/users/explain/figures.rst @@ -52,7 +52,7 @@ MacOS backend as well. These are typically chosen either in the user's ``matplotlib.use('QtAgg')`` at the beginning of a session or script. When run from a script, or interactively (e.g. from an -`iPython shell `_) the Figure +`iPython shell `_) the Figure will not be shown until we call ``plt.show()``. The Figure will appear in a new GUI window, and usually will have a toolbar with Zoom, Pan, and other tools for interacting with the Figure. By default, ``plt.show()`` blocks diff --git a/doc/users/github_stats.rst b/doc/users/github_stats.rst index cde7ccfe38e2..cbeb72270f2e 100644 --- a/doc/users/github_stats.rst +++ b/doc/users/github_stats.rst @@ -1,16 +1,16 @@ .. _github-stats: -GitHub statistics for 3.7.0 (Jan 25, 2023) -========================================== +GitHub statistics (Feb 13, 2023) +================================ -GitHub statistics for 2022/09/16 (tag: v3.6.0) - 2023/01/25 +GitHub statistics for 2022/09/16 (tag: v3.6.0) - 2023/02/13 These lists are automatically generated, and may be incomplete or contain duplicates. -We closed 110 issues and merged 380 pull requests. +We closed 120 issues and merged 427 pull requests. The full list can be seen `on GitHub `__ -The following 107 authors contributed 2268 commits. +The following 112 authors contributed 1962 commits. * Abhijnan Bajpai * Adrien F. Vincent @@ -30,10 +30,13 @@ The following 107 authors contributed 2268 commits. * David Stansby * dependabot[bot] * DerWeh +* Eero Vaher * Elliott Sales de Andrade * Eric Larson +* Eric Prestat * erykoff * EunHo Lee +* Felix Goudreault * Greg Lucas * hannah * Ian Hunt-Isaak @@ -53,6 +56,7 @@ The following 107 authors contributed 2268 commits. * John Paul Jepko * Joseph Fox-Rabinovitz * Joshua Barrass +* Julian Chen * Junaid Khan * Justin Tracey * Kaidong Hu @@ -87,6 +91,7 @@ The following 107 authors contributed 2268 commits. * Pratim Ugale * pre-commit-ci[bot] * ramvikrams +* richardsheridan * Ruth Comer * Ryan May * saranti @@ -122,8 +127,55 @@ The following 107 authors contributed 2268 commits. GitHub issues and pull requests: -Pull Requests (380): +Pull Requests (427): +* :ghpull:`25201`: Backport PR #25196 on branch v3.7.x (Add deprecation for setting data with non sequence type in ``Line2D``) +* :ghpull:`25196`: Add deprecation for setting data with non sequence type in ``Line2D`` +* :ghpull:`25197`: Backport PR #25193 on branch v3.7.x (Fix displacement of colorbar for eps with bbox_inches='tight') +* :ghpull:`25193`: Fix displacement of colorbar for eps with bbox_inches='tight' +* :ghpull:`24781`: DOC: restore SHA to footer +* :ghpull:`25188`: Backport PR #25085 on branch v3.7.x (FIX: only try to update blit caches if the canvas we expect) +* :ghpull:`25170`: Backport PR #25097 on branch v3.7.x (fix FigureCanvasTkAgg memory leak via weakrefs) +* :ghpull:`25186`: Backport PR #24893 on branch v3.7.x (STY: make allowed line length 9 longer to 88 from 79) +* :ghpull:`25185`: Backport PR #25183 on branch v3.7.x (FIX: do not use deprecated API internally) +* :ghpull:`25184`: Backport PR #25174 on branch v3.7.x (Accept LA icons for the toolbar) +* :ghpull:`25085`: FIX: only try to update blit caches if the canvas we expect +* :ghpull:`25183`: FIX: do not use deprecated API internally +* :ghpull:`25182`: Backport PR #25052 on branch v3.7.x (Support both Bbox and list for bbox to table/Table) +* :ghpull:`25174`: Accept LA icons for the toolbar +* :ghpull:`25052`: Support both Bbox and list for bbox to table/Table +* :ghpull:`25095`: Backport PR #23442 on branch v3.7.x (Remove need to detect math mode in pgf strings) +* :ghpull:`25097`: fix FigureCanvasTkAgg memory leak via weakrefs +* :ghpull:`25167`: Backport PR #25122 on branch v3.7.x (FIX: scaling factor for window with negative value) +* :ghpull:`25122`: FIX: scaling factor for window with negative value +* :ghpull:`25161`: Backport PR #25158 on branch v3.7.x (Disconnect SubplotTool destroyer callback on tool_fig close) +* :ghpull:`25160`: Backport PR #25129 on branch v3.7.x (Undeprecate Cursor event handlers) +* :ghpull:`25158`: Disconnect SubplotTool destroyer callback on tool_fig close +* :ghpull:`25129`: Undeprecate Cursor event handlers +* :ghpull:`25154`: Backport PR #25151 on branch v3.7.x (Increase timeout to GitHub API) +* :ghpull:`25151`: Increase timeout to GitHub API +* :ghpull:`25136`: Backport PR #25126 on branch v3.7.x (FIX: fully invalidate TransformWrapper parents before swapping) +* :ghpull:`25132`: Backport PR #24993 on branch v3.7.x ([DOC] GitHub spelling and links) +* :ghpull:`25126`: FIX: fully invalidate TransformWrapper parents before swapping +* :ghpull:`24993`: [DOC] GitHub spelling and links +* :ghpull:`25118`: Backport PR #25113 on branch v3.7.x (Fix outdated comment re: _update_label_position.) +* :ghpull:`25113`: Fix outdated comment re: _update_label_position. +* :ghpull:`25111`: Backport PR #25110 on branch v3.7.x (Stop recommending ``ncol`` in legend examples) +* :ghpull:`25110`: Stop recommending ``ncol`` in legend examples +* :ghpull:`25106`: Fix cursor_demo wrt. Line2D.set_x/ydata not accepting scalars anymore. +* :ghpull:`25103`: Backport PR #25098 on branch v3.7.x (Correctly pass valinit as keyword in SliderTool.) +* :ghpull:`25098`: Correctly pass valinit as keyword in SliderTool. +* :ghpull:`23442`: Remove need to detect math mode in pgf strings +* :ghpull:`25093`: Backport PR #25092 on branch v3.7.x (Fix distribution of test data) +* :ghpull:`24893`: STY: make allowed line length 9 longer to 88 from 79 +* :ghpull:`25092`: Fix distribution of test data +* :ghpull:`25089`: Backport PR #25088 on branch v3.7.x (DOC: Fix broken cross-reference when building PDF) +* :ghpull:`25088`: DOC: Fix broken cross-reference when building PDF +* :ghpull:`25083`: Backport PR #25074 on branch v3.7.x (Revert "Use system distutils instead of the setuptools copy") +* :ghpull:`25082`: Backport PR #25079 on branch v3.7.x (FIX: Only send one update signal when autoscaling norms) +* :ghpull:`25084`: DOC: Fix typos in GitHub stats +* :ghpull:`25074`: Revert "Use system distutils instead of the setuptools copy" +* :ghpull:`25079`: FIX: Only send one update signal when autoscaling norms * :ghpull:`25072`: Merge v3.6.x into v3.7.x * :ghpull:`25071`: Backport PR #25039 on branch v3.7.x (Updated WebAgg JS to check and send request over wss if using HTTPS) * :ghpull:`25039`: Updated WebAgg JS to check and send request over wss if using HTTPS @@ -414,7 +466,7 @@ Pull Requests (380): * :ghpull:`24298`: List all the places to update when adding a dependency. * :ghpull:`24289`: Cleanup image_zcoord example. * :ghpull:`23865`: Add test and example for VBoxDivider -* :ghpull:`24287`: Simplifying glyph stream logic in ps backend +* :ghpull:`24287`: Simplifying glyph stream logic in ps backend * :ghpull:`24291`: Rely on builtin round() instead of manual rounding. * :ghpull:`24062`: Replaced std::random_shuffle with std::shuffle in tri * :ghpull:`24278`: Use oldest-supported-numpy for build @@ -478,7 +530,7 @@ Pull Requests (380): * :ghpull:`23579`: Remove direct manipulation of HostAxes.parasites by end users. * :ghpull:`23553`: Add tests for ImageGrid * :ghpull:`23918`: Merge v3.6.x branch to main -* :ghpull:`23902`: Add test and improve examples for mpl_toolkits +* :ghpull:`23902`: Add test and improve examples for mpl_toolkits * :ghpull:`23950`: DOC: Don't import doctest because we're not using it * :ghpull:`21006`: Rotate errorbar caps in polar plots * :ghpull:`23870`: Implement Sphinx-Gallery's ``make html-noplot`` @@ -505,8 +557,18 @@ Pull Requests (380): * :ghpull:`22614`: ENH: Add pan and zoom toolbar handling to 3D Axes * :ghpull:`21562`: Add a test for Hexbin Linear -Issues (110): +Issues (120): +* :ghissue:`25176`: [Bug]: Colorbar is displaced when saving as .eps with bbox_inches='tight' +* :ghissue:`25075`: [Bug]: Widget blitting broken when saving as PDF +* :ghissue:`25181`: unavoidable warnings in nbagg on ``plt.close`` +* :ghissue:`25134`: [Doc]: pyplot.boxplot whisker length wrong docs +* :ghissue:`24395`: Any resizing of the plot after plt.show results in an error when closing the window +* :ghissue:`25107`: [Doc]: annotated_cursor example seems broken +* :ghissue:`25124`: [Bug]: ax.plot(x,y) disappears after changing y_scale +* :ghissue:`8278`: FuncAnimation with generator defaults to arbitrary save_count=100 +* :ghissue:`22765`: Document distutil vs setuptools issues or fix usage +* :ghissue:`25077`: [Bug]: Setting norm with existing colorbar fails with 3.6.3 * :ghissue:`23999`: [Bug]: Annotation misplaced when rasterizing and saving as PDF * :ghissue:`25040`: [Bug]: Request to insecure websocket endpoint is blocked by browser * :ghissue:`24678`: [Bug]: pcolormesh doesn't allow shading = 'flat' in the option diff --git a/doc/users/next_whats_new/3d_pane_color_rcparams.rst b/doc/users/next_whats_new/3d_pane_color_rcparams.rst deleted file mode 100644 index 949b75a322c8..000000000000 --- a/doc/users/next_whats_new/3d_pane_color_rcparams.rst +++ /dev/null @@ -1,18 +0,0 @@ -rcParam for 3D pane color -------------------------- - -The rcParams :rc:`axes3d.xaxis.panecolor`, :rc:`axes3d.yaxis.panecolor`, -:rc:`axes3d.zaxis.panecolor` can be used to change the color of the background -panes in 3D plots. Note that it is often beneficial to give them slightly -different shades to obtain a "3D effect" and to make them slightly transparent -(alpha < 1). - -.. plot:: - :include-source: true - - import matplotlib.pyplot as plt - with plt.rc_context({'axes3d.xaxis.panecolor': (0.9, 0.0, 0.0, 0.5), - 'axes3d.yaxis.panecolor': (0.7, 0.0, 0.0, 0.5), - 'axes3d.zaxis.panecolor': (0.8, 0.0, 0.0, 0.5)}): - fig = plt.figure() - fig.add_subplot(projection='3d') diff --git a/doc/users/next_whats_new/3d_plot_aspects_adjustable_keyword.rst b/doc/users/next_whats_new/3d_plot_aspects_adjustable_keyword.rst deleted file mode 100644 index 5a231024a759..000000000000 --- a/doc/users/next_whats_new/3d_plot_aspects_adjustable_keyword.rst +++ /dev/null @@ -1,34 +0,0 @@ -*adjustable* keyword argument for setting equal aspect ratios in 3D -------------------------------------------------------------------- - -While setting equal aspect ratios for 3D plots, users can choose to modify -either the data limits or the bounding box. - -.. plot:: - :include-source: true - - import matplotlib.pyplot as plt - import numpy as np - from itertools import combinations, product - - aspects = ('auto', 'equal', 'equalxy', 'equalyz', 'equalxz') - fig, axs = plt.subplots(1, len(aspects), subplot_kw={'projection': '3d'}, - figsize=(12, 6)) - - # Draw rectangular cuboid with side lengths [4, 3, 5] - r = [0, 1] - scale = np.array([4, 3, 5]) - pts = combinations(np.array(list(product(r, r, r))), 2) - for start, end in pts: - if np.sum(np.abs(start - end)) == r[1] - r[0]: - for ax in axs: - ax.plot3D(*zip(start*scale, end*scale), color='C0') - - # Set the aspect ratios - for i, ax in enumerate(axs): - ax.set_aspect(aspects[i], adjustable='datalim') - # Alternatively: ax.set_aspect(aspects[i], adjustable='box') - # which will change the box aspect ratio instead of axis data limits. - ax.set_title(f"set_aspect('{aspects[i]}')") - - plt.show() diff --git a/doc/users/next_whats_new/3d_plot_pan_zoom.rst b/doc/users/next_whats_new/3d_plot_pan_zoom.rst deleted file mode 100644 index a94dfe4c207d..000000000000 --- a/doc/users/next_whats_new/3d_plot_pan_zoom.rst +++ /dev/null @@ -1,8 +0,0 @@ -3D plot pan and zoom buttons ----------------------------- - -The pan and zoom buttons in the toolbar of 3D plots are now enabled. -Unselect both to rotate the plot. When the zoom button is pressed, -zoom in by using the left mouse button to draw a bounding box, and -out by using the right mouse button to draw the box. When zooming a -3D plot, the current view aspect ratios are kept fixed. diff --git a/doc/users/next_whats_new/bar_label_formatting.rst b/doc/users/next_whats_new/bar_label_formatting.rst deleted file mode 100644 index 90b3d088ff84..000000000000 --- a/doc/users/next_whats_new/bar_label_formatting.rst +++ /dev/null @@ -1,33 +0,0 @@ -Additional format string options in `~matplotlib.axes.Axes.bar_label` ---------------------------------------------------------------------- - -The ``fmt`` argument of `~matplotlib.axes.Axes.bar_label` now accepts -{}-style format strings: - -.. plot:: - :include-source: true - - import matplotlib.pyplot as plt - - fruit_names = ['Coffee', 'Salted Caramel', 'Pistachio'] - fruit_counts = [4000, 2000, 7000] - - fig, ax = plt.subplots() - bar_container = ax.bar(fruit_names, fruit_counts) - ax.set(ylabel='pints sold', title='Gelato sales by flavor', ylim=(0, 8000)) - ax.bar_label(bar_container, fmt='{:,.0f}') - -It also accepts callables: - -.. plot:: - :include-source: true - - animal_names = ['Lion', 'Gazelle', 'Cheetah'] - mph_speed = [50, 60, 75] - - fig, ax = plt.subplots() - bar_container = ax.bar(animal_names, mph_speed) - ax.set(ylabel='speed in MPH', title='Running speeds', ylim=(0, 80)) - ax.bar_label( - bar_container, fmt=lambda x: '{:.1f} km/h'.format(x * 1.61) - ) diff --git a/doc/users/next_whats_new/colorbar_has_location_argument.rst b/doc/users/next_whats_new/colorbar_has_location_argument.rst deleted file mode 100644 index 5eb02e8be689..000000000000 --- a/doc/users/next_whats_new/colorbar_has_location_argument.rst +++ /dev/null @@ -1,25 +0,0 @@ -``colorbar`` now has a *location* keyword argument -================================================== - -The ``colorbar`` method now supports a *location* keyword argument to more -easily position the color bar. This is useful when providing your own inset -axes using the *cax* keyword argument and behaves similar to the case where -axes are not provided (where the *location* keyword is passed through). -*orientation* and *ticklocation* are no longer required as they are -determined by *location*. *ticklocation* can still be provided if the -automatic setting is not preferred. (*orientation* can also be provided but -must be compatible with the *location*.) - -An example is: - -.. plot:: - :include-source: true - - import matplotlib.pyplot as plt - import numpy as np - rng = np.random.default_rng(19680801) - imdata = rng.random((10, 10)) - fig, ax = plt.subplots(layout='constrained') - im = ax.imshow(imdata) - fig.colorbar(im, cax=ax.inset_axes([0, 1.05, 1, 0.05]), - location='top') diff --git a/doc/users/next_whats_new/documentation.rst b/doc/users/next_whats_new/documentation.rst deleted file mode 100644 index 9e7625a09d0d..000000000000 --- a/doc/users/next_whats_new/documentation.rst +++ /dev/null @@ -1,6 +0,0 @@ -New & Improved Narrative Documentation -====================================== -* Brand new :doc:`Animations ` tutorial. -* New grouped and stacked `bar chart <../../gallery/index.html#lines_bars_and_markers>`_ examples. -* New section for new contributors and reorganized git instructions in the :ref:`contributing guide`. -* Restructured :doc:`/tutorials/text/annotations` tutorial. diff --git a/doc/users/next_whats_new/ellipse_annotation.rst b/doc/users/next_whats_new/ellipse_annotation.rst deleted file mode 100644 index d6a989e77a5b..000000000000 --- a/doc/users/next_whats_new/ellipse_annotation.rst +++ /dev/null @@ -1,15 +0,0 @@ -``ellipse`` boxstyle option for annotations -------------------------------------------- - -The ``'ellipse'`` option for boxstyle can now be used to create annotations -with an elliptical outline. It can be used as a closed curve shape for -longer texts instead of the ``'circle'`` boxstyle which can get quite big. - -.. plot:: - :include-source: true - - import matplotlib.pyplot as plt - fig, ax = plt.subplots(figsize=(5, 5)) - t = ax.text(0.5, 0.5, "elliptical box", - ha="center", size=15, - bbox=dict(boxstyle="ellipse,pad=0.3")) diff --git a/doc/users/next_whats_new/figure_hooks.rst b/doc/users/next_whats_new/figure_hooks.rst deleted file mode 100644 index 7132e4875f92..000000000000 --- a/doc/users/next_whats_new/figure_hooks.rst +++ /dev/null @@ -1,8 +0,0 @@ -Figure hooks -~~~~~~~~~~~~ -The new :rc:`figure.hooks` provides a mechanism to register -arbitrary customizations on pyplot figures; it is a list of -"dotted.module.name:dotted.callable.name" strings specifying functions -that are called on each figure created by `.pyplot.figure`; these -functions can e.g. attach callbacks or modify the toolbar. See -:doc:`/gallery/user_interfaces/mplcvd` for an example of toolbar customization. diff --git a/doc/users/next_whats_new/imshow_extent_units.rst b/doc/users/next_whats_new/imshow_extent_units.rst deleted file mode 100644 index fac21b043fa4..000000000000 --- a/doc/users/next_whats_new/imshow_extent_units.rst +++ /dev/null @@ -1,20 +0,0 @@ -The *extent* of ``imshow`` can now be expressed with units ----------------------------------------------------------- -The *extent* parameter of `~.axes.Axes.imshow` and `~.AxesImage.set_extent` -can now be expressed with units. - -.. plot:: - :include-source: true - - import matplotlib.pyplot as plt - import numpy as np - - fig, ax = plt.subplots(layout='constrained') - date_first = np.datetime64('2020-01-01', 'D') - date_last = np.datetime64('2020-01-11', 'D') - - arr = [[i+j for i in range(10)] for j in range(10)] - - ax.imshow(arr, origin='lower', extent=[0, 10, date_first, date_last]) - - plt.show() diff --git a/doc/users/next_whats_new/legend-figure-outside.rst b/doc/users/next_whats_new/legend-figure-outside.rst deleted file mode 100644 index a78725b4e2b6..000000000000 --- a/doc/users/next_whats_new/legend-figure-outside.rst +++ /dev/null @@ -1,8 +0,0 @@ -Figure legends can be placed outside figures using constrained_layout ---------------------------------------------------------------------- -Constrained layout will make space for Figure legends if they are specified -by a *loc* keyword argument that starts with the string "outside". The -codes are unique from axes codes, in that "outside upper right" will -make room at the top of the figure for the legend, whereas -"outside right upper" will make room on the right-hand side of the figure. -See :doc:`/tutorials/intermediate/legend_guide` for details. diff --git a/doc/users/next_whats_new/per_subplot_mosaic.rst b/doc/users/next_whats_new/per_subplot_mosaic.rst deleted file mode 100644 index f62e231d2665..000000000000 --- a/doc/users/next_whats_new/per_subplot_mosaic.rst +++ /dev/null @@ -1,30 +0,0 @@ -``subplot_mosaic`` no longer provisional ----------------------------------------- - -The API on `.Figure.subplot_mosaic` and `.pyplot.subplot_mosaic` are now -considered stable and will change under Matplotlib's normal deprecation -process. - - -Per-subplot keyword arguments in ``subplot_mosaic`` ----------------------------------------------------- - -It is now possible to pass keyword arguments through to Axes creation in each -specific call to ``add_subplot`` in `.Figure.subplot_mosaic` and -`.pyplot.subplot_mosaic` : - -.. plot:: - :include-source: true - - fig, axd = plt.subplot_mosaic( - "AB;CD", - per_subplot_kw={ - "A": {"projection": "polar"}, - ("C", "D"): {"xscale": "log"}, - "B": {"projection": "3d"}, - }, - ) - - -This is particularly useful for creating mosaics with mixed projections, but -any keyword arguments can be passed through. diff --git a/doc/users/next_whats_new/pie_hatch.rst b/doc/users/next_whats_new/pie_hatch.rst deleted file mode 100644 index f54def10e954..000000000000 --- a/doc/users/next_whats_new/pie_hatch.rst +++ /dev/null @@ -1,18 +0,0 @@ -``hatch`` parameter for pie -------------------------------------------- - -`~matplotlib.axes.Axes.pie` now accepts a *hatch* keyword that takes as input -a hatch or list of hatches: - -.. plot:: - :include-source: true - :alt: Two pie charts, identified as ax1 and ax2, both have a small blue slice, a medium orange slice, and a large green slice. ax1 has a dot hatching on the small slice, a small open circle hatching on the medium slice, and a large open circle hatching on the large slice. ax2 has the same large open circle with a dot hatch on every slice. - - fig, (ax1, ax2) = plt.subplots(ncols=2) - x = [10, 30, 60] - - ax1.pie(x, hatch=['.', 'o', 'O']) - ax2.pie(x, hatch='.O') - - ax1.set_title("hatch=['.', 'o', 'O']") - ax2.set_title("hatch='.O'") diff --git a/doc/users/next_whats_new/polar_errorbar_caps.rst b/doc/users/next_whats_new/polar_errorbar_caps.rst deleted file mode 100644 index 1066a2aaaf11..000000000000 --- a/doc/users/next_whats_new/polar_errorbar_caps.rst +++ /dev/null @@ -1,7 +0,0 @@ -Fixed errorbars in polar plots ------------------------------- -Caps and error lines are now drawn with respect to polar coordinates, -when plotting errorbars on polar plots. - -.. figure:: /gallery/pie_and_polar_charts/images/sphx_glr_polar_error_caps_001.png - :target: ../../gallery/pie_and_polar_charts/polar_error_caps.html diff --git a/doc/users/next_whats_new/reverse_legend.rst b/doc/users/next_whats_new/reverse_legend.rst deleted file mode 100644 index 00f2c0dbeac7..000000000000 --- a/doc/users/next_whats_new/reverse_legend.rst +++ /dev/null @@ -1,4 +0,0 @@ -Reversed order of legend entries --------------------------------- -The order of legend entries can now be reversed by passing ``reverse=True`` to -`~.Axes.legend`. diff --git a/doc/users/next_whats_new/rgba_pcolormesh.rst b/doc/users/next_whats_new/rgba_pcolormesh.rst deleted file mode 100644 index 4088677867c0..000000000000 --- a/doc/users/next_whats_new/rgba_pcolormesh.rst +++ /dev/null @@ -1,16 +0,0 @@ -``pcolormesh`` accepts RGB(A) colors ------------------------------------- - -The `~.Axes.pcolormesh` method can now handle explicit colors -specified with RGB(A) values. To specify colors, the array must be 3D -with a shape of ``(M, N, [3, 4])``. - -.. plot:: - :include-source: true - - import matplotlib.pyplot as plt - import numpy as np - - colors = np.linspace(0, 1, 90).reshape((5, 6, 3)) - plt.pcolormesh(colors) - plt.show() diff --git a/doc/users/next_whats_new/shade_poly3dcollection.rst b/doc/users/next_whats_new/shade_poly3dcollection.rst deleted file mode 100644 index 4a9199eb8c49..000000000000 --- a/doc/users/next_whats_new/shade_poly3dcollection.rst +++ /dev/null @@ -1,33 +0,0 @@ -``Poly3DCollection`` supports shading -------------------------------------- - -It is now possible to shade a `.Poly3DCollection`. This is useful if the -polygons are obtained from e.g. a 3D model. - -.. plot:: - :include-source: true - - import numpy as np - import matplotlib.pyplot as plt - from mpl_toolkits.mplot3d.art3d import Poly3DCollection - - # Define 3D shape - block = np.array([ - [[1, 1, 0], - [1, 0, 0], - [0, 1, 0]], - [[1, 1, 0], - [1, 1, 1], - [1, 0, 0]], - [[1, 1, 0], - [1, 1, 1], - [0, 1, 0]], - [[1, 0, 0], - [1, 1, 1], - [0, 1, 0]] - ]) - - ax = plt.subplot(projection='3d') - pc = Poly3DCollection(block, facecolors='b', shade=True) - ax.add_collection(pc) - plt.show() diff --git a/doc/users/next_whats_new/show_source_links_directive_option.rst b/doc/users/next_whats_new/show_source_links_directive_option.rst deleted file mode 100644 index 8beb233f32e8..000000000000 --- a/doc/users/next_whats_new/show_source_links_directive_option.rst +++ /dev/null @@ -1,7 +0,0 @@ -Source links can be shown or hidden for each Sphinx plot directive ------------------------------------------------------------------- -The :doc:`Sphinx plot directive ` -(``.. plot::``) now supports a ``:show-source-link:`` option to show or hide -the link to the source code for each plot. The default is set using the -``plot_html_show_source_link`` variable in :file:`conf.py` (which -defaults to True). diff --git a/doc/users/next_whats_new/styles_from_packages.rst b/doc/users/next_whats_new/styles_from_packages.rst deleted file mode 100644 index d129bb356fa7..000000000000 --- a/doc/users/next_whats_new/styles_from_packages.rst +++ /dev/null @@ -1,11 +0,0 @@ -Style files can be imported from third-party packages ------------------------------------------------------ - -Third-party packages can now distribute style files that are globally available -as follows. Assume that a package is importable as ``import mypackage``, with -a ``mypackage/__init__.py`` module. Then a ``mypackage/presentation.mplstyle`` -style sheet can be used as ``plt.style.use("mypackage.presentation")``. - -The implementation does not actually import ``mypackage``, making this process -safe against possible import-time side effects. Subpackages (e.g. -``dotted.package.name``) are also supported. diff --git a/doc/users/next_whats_new/view_current_axis_format.rst b/doc/users/next_whats_new/view_current_axis_format.rst deleted file mode 100644 index eb7e03600f0e..000000000000 --- a/doc/users/next_whats_new/view_current_axis_format.rst +++ /dev/null @@ -1,29 +0,0 @@ -View current appearance settings for ticks, tick labels, and gridlines ----------------------------------------------------------------------- - -The new `~matplotlib.axis.Axis.get_tick_params` method can be used to -retrieve the appearance settings that will be applied to any -additional ticks, tick labels, and gridlines added to the plot: - -.. code-block:: pycon - - >>> import matplotlib.pyplot as plt - - >>> fig, ax = plt.subplots() - >>> ax.yaxis.set_tick_params(labelsize=30, labelcolor='red', - ... direction='out', which='major') - >>> ax.yaxis.get_tick_params(which='major') - {'direction': 'out', - 'left': True, - 'right': False, - 'labelleft': True, - 'labelright': False, - 'gridOn': False, - 'labelsize': 30, - 'labelcolor': 'red'} - >>> ax.yaxis.get_tick_params(which='minor') - {'left': True, - 'right': False, - 'labelleft': True, - 'labelright': False, - 'gridOn': False} diff --git a/doc/users/next_whats_new/widget_blitting.rst b/doc/users/next_whats_new/widget_blitting.rst deleted file mode 100644 index 129ce8953d6f..000000000000 --- a/doc/users/next_whats_new/widget_blitting.rst +++ /dev/null @@ -1,7 +0,0 @@ -Blitting in Button widgets --------------------------- - -The `.Button`, `.CheckButtons`, and `.RadioButtons` widgets now support -blitting for faster rendering, on backends that support it, by passing -``useblit=True`` to the constructor. Blitting is enabled by default on -supported backends. diff --git a/doc/users/next_whats_new/widget_button_styling.rst b/doc/users/next_whats_new/widget_button_styling.rst deleted file mode 100644 index 4307e6977fc5..000000000000 --- a/doc/users/next_whats_new/widget_button_styling.rst +++ /dev/null @@ -1,31 +0,0 @@ -Custom styling of button widgets --------------------------------- - -Additional custom styling of button widgets may be achieved via the -*label_props* and *radio_props* arguments to `.RadioButtons`; and the -*label_props*, *frame_props*, and *check_props* arguments to `.CheckButtons`. - -.. plot:: - - from matplotlib.widgets import CheckButtons, RadioButtons - - fig, ax = plt.subplots(nrows=2, ncols=2, figsize=(5, 2), width_ratios=[1, 2]) - default_rb = RadioButtons(ax[0, 0], ['Apples', 'Oranges']) - styled_rb = RadioButtons(ax[0, 1], ['Apples', 'Oranges'], - label_props={'color': ['red', 'orange'], - 'fontsize': [16, 20]}, - radio_props={'edgecolor': ['red', 'orange'], - 'facecolor': ['mistyrose', 'peachpuff']}) - - default_cb = CheckButtons(ax[1, 0], ['Apples', 'Oranges'], - actives=[True, True]) - styled_cb = CheckButtons(ax[1, 1], ['Apples', 'Oranges'], - actives=[True, True], - label_props={'color': ['red', 'orange'], - 'fontsize': [16, 20]}, - frame_props={'edgecolor': ['red', 'orange'], - 'facecolor': ['mistyrose', 'peachpuff']}, - check_props={'color': ['darkred', 'darkorange']}) - - ax[0, 0].set_title('Default') - ax[0, 1].set_title('Stylized') diff --git a/doc/users/prev_whats_new/whats_new_3.7.0.rst b/doc/users/prev_whats_new/whats_new_3.7.0.rst new file mode 100644 index 000000000000..cbbcd50c7e6a --- /dev/null +++ b/doc/users/prev_whats_new/whats_new_3.7.0.rst @@ -0,0 +1,450 @@ +============================================= +What's new in Matplotlib 3.7.0 (Feb 10, 2023) +============================================= + +For a list of all of the issues and pull requests since the last revision, see +the :ref:`github-stats`. + +.. contents:: Table of Contents + :depth: 4 + +.. toctree:: + :maxdepth: 4 + +Plotting and Annotation improvements +==================================== + + +``hatch`` parameter for pie +--------------------------- + +`~matplotlib.axes.Axes.pie` now accepts a *hatch* keyword that takes as input +a hatch or list of hatches: + +.. plot:: + :include-source: true + :alt: Two pie charts, identified as ax1 and ax2, both have a small blue slice, a medium orange slice, and a large green slice. ax1 has a dot hatching on the small slice, a small open circle hatching on the medium slice, and a large open circle hatching on the large slice. ax2 has the same large open circle with a dot hatch on every slice. + + fig, (ax1, ax2) = plt.subplots(ncols=2) + x = [10, 30, 60] + + ax1.pie(x, hatch=['.', 'o', 'O']) + ax2.pie(x, hatch='.O') + + ax1.set_title("hatch=['.', 'o', 'O']") + ax2.set_title("hatch='.O'") + + +Polar plot errors drawn in polar coordinates +-------------------------------------------- +Caps and error lines are now drawn with respect to polar coordinates, +when plotting errorbars on polar plots. + +.. figure:: /gallery/pie_and_polar_charts/images/sphx_glr_polar_error_caps_001.png + :target: ../../gallery/pie_and_polar_charts/polar_error_caps.html + + + +Additional format string options in `~matplotlib.axes.Axes.bar_label` +--------------------------------------------------------------------- + +The ``fmt`` argument of `~matplotlib.axes.Axes.bar_label` now accepts +{}-style format strings: + +.. plot:: + :include-source: true + + import matplotlib.pyplot as plt + + fruit_names = ['Coffee', 'Salted Caramel', 'Pistachio'] + fruit_counts = [4000, 2000, 7000] + + fig, ax = plt.subplots() + bar_container = ax.bar(fruit_names, fruit_counts) + ax.set(ylabel='pints sold', title='Gelato sales by flavor', ylim=(0, 8000)) + ax.bar_label(bar_container, fmt='{:,.0f}') + +It also accepts callables: + +.. plot:: + :include-source: true + + animal_names = ['Lion', 'Gazelle', 'Cheetah'] + mph_speed = [50, 60, 75] + + fig, ax = plt.subplots() + bar_container = ax.bar(animal_names, mph_speed) + ax.set(ylabel='speed in MPH', title='Running speeds', ylim=(0, 80)) + ax.bar_label( + bar_container, fmt=lambda x: '{:.1f} km/h'.format(x * 1.61) + ) + + + +``ellipse`` boxstyle option for annotations +------------------------------------------- + +The ``'ellipse'`` option for boxstyle can now be used to create annotations +with an elliptical outline. It can be used as a closed curve shape for +longer texts instead of the ``'circle'`` boxstyle which can get quite big. + +.. plot:: + :include-source: true + + import matplotlib.pyplot as plt + fig, ax = plt.subplots(figsize=(5, 5)) + t = ax.text(0.5, 0.5, "elliptical box", + ha="center", size=15, + bbox=dict(boxstyle="ellipse,pad=0.3")) + + +The *extent* of ``imshow`` can now be expressed with units +---------------------------------------------------------- +The *extent* parameter of `~.axes.Axes.imshow` and `~.AxesImage.set_extent` +can now be expressed with units. + +.. plot:: + :include-source: true + + import matplotlib.pyplot as plt + import numpy as np + + fig, ax = plt.subplots(layout='constrained') + date_first = np.datetime64('2020-01-01', 'D') + date_last = np.datetime64('2020-01-11', 'D') + + arr = [[i+j for i in range(10)] for j in range(10)] + + ax.imshow(arr, origin='lower', extent=[0, 10, date_first, date_last]) + + plt.show() + +Reversed order of legend entries +-------------------------------- +The order of legend entries can now be reversed by passing ``reverse=True`` to +`~.Axes.legend`. + + +``pcolormesh`` accepts RGB(A) colors +------------------------------------ + +The `~.Axes.pcolormesh` method can now handle explicit colors +specified with RGB(A) values. To specify colors, the array must be 3D +with a shape of ``(M, N, [3, 4])``. + +.. plot:: + :include-source: true + + import matplotlib.pyplot as plt + import numpy as np + + colors = np.linspace(0, 1, 90).reshape((5, 6, 3)) + plt.pcolormesh(colors) + plt.show() + + + + +View current appearance settings for ticks, tick labels, and gridlines +---------------------------------------------------------------------- + +The new `~matplotlib.axis.Axis.get_tick_params` method can be used to +retrieve the appearance settings that will be applied to any +additional ticks, tick labels, and gridlines added to the plot: + +.. code-block:: pycon + + >>> import matplotlib.pyplot as plt + + >>> fig, ax = plt.subplots() + >>> ax.yaxis.set_tick_params(labelsize=30, labelcolor='red', + ... direction='out', which='major') + >>> ax.yaxis.get_tick_params(which='major') + {'direction': 'out', + 'left': True, + 'right': False, + 'labelleft': True, + 'labelright': False, + 'gridOn': False, + 'labelsize': 30, + 'labelcolor': 'red'} + >>> ax.yaxis.get_tick_params(which='minor') + {'left': True, + 'right': False, + 'labelleft': True, + 'labelright': False, + 'gridOn': False} + + + +Style files can be imported from third-party packages +----------------------------------------------------- + +Third-party packages can now distribute style files that are globally available +as follows. Assume that a package is importable as ``import mypackage``, with +a ``mypackage/__init__.py`` module. Then a ``mypackage/presentation.mplstyle`` +style sheet can be used as ``plt.style.use("mypackage.presentation")``. + +The implementation does not actually import ``mypackage``, making this process +safe against possible import-time side effects. Subpackages (e.g. +``dotted.package.name``) are also supported. + + +Improvements to 3D Plotting +=========================== + + +3D plot pan and zoom buttons +---------------------------- + +The pan and zoom buttons in the toolbar of 3D plots are now enabled. +Unselect both to rotate the plot. When the zoom button is pressed, +zoom in by using the left mouse button to draw a bounding box, and +out by using the right mouse button to draw the box. When zooming a +3D plot, the current view aspect ratios are kept fixed. + + +*adjustable* keyword argument for setting equal aspect ratios in 3D +------------------------------------------------------------------- + +While setting equal aspect ratios for 3D plots, users can choose to modify +either the data limits or the bounding box in parity with 2D Axes. + +.. plot:: + :include-source: true + + import matplotlib.pyplot as plt + import numpy as np + from itertools import combinations, product + + aspects = ('auto', 'equal', 'equalxy', 'equalyz', 'equalxz') + fig, axs = plt.subplots(1, len(aspects), subplot_kw={'projection': '3d'}, + figsize=(12, 6)) + + # Draw rectangular cuboid with side lengths [4, 3, 5] + r = [0, 1] + scale = np.array([4, 3, 5]) + pts = combinations(np.array(list(product(r, r, r))), 2) + for start, end in pts: + if np.sum(np.abs(start - end)) == r[1] - r[0]: + for ax in axs: + ax.plot3D(*zip(start*scale, end*scale), color='C0') + + # Set the aspect ratios + for i, ax in enumerate(axs): + ax.set_aspect(aspects[i], adjustable='datalim') + # Alternatively: ax.set_aspect(aspects[i], adjustable='box') + # which will change the box aspect ratio instead of axis data limits. + ax.set_title(f"set_aspect('{aspects[i]}')") + + plt.show() + + +``Poly3DCollection`` supports shading +------------------------------------- + +It is now possible to shade a `.Poly3DCollection`. This is useful if the +polygons are obtained from e.g. a 3D model. + +.. plot:: + :include-source: true + + import numpy as np + import matplotlib.pyplot as plt + from mpl_toolkits.mplot3d.art3d import Poly3DCollection + + # Define 3D shape + block = np.array([ + [[1, 1, 0], + [1, 0, 0], + [0, 1, 0]], + [[1, 1, 0], + [1, 1, 1], + [1, 0, 0]], + [[1, 1, 0], + [1, 1, 1], + [0, 1, 0]], + [[1, 0, 0], + [1, 1, 1], + [0, 1, 0]] + ]) + + ax = plt.subplot(projection='3d') + pc = Poly3DCollection(block, facecolors='b', shade=True) + ax.add_collection(pc) + plt.show() + + + +rcParam for 3D pane color +------------------------- + +The rcParams :rc:`axes3d.xaxis.panecolor`, :rc:`axes3d.yaxis.panecolor`, +:rc:`axes3d.zaxis.panecolor` can be used to change the color of the background +panes in 3D plots. Note that it is often beneficial to give them slightly +different shades to obtain a "3D effect" and to make them slightly transparent +(alpha < 1). + +.. plot:: + :include-source: true + + import matplotlib.pyplot as plt + with plt.rc_context({'axes3d.xaxis.panecolor': (0.9, 0.0, 0.0, 0.5), + 'axes3d.yaxis.panecolor': (0.7, 0.0, 0.0, 0.5), + 'axes3d.zaxis.panecolor': (0.8, 0.0, 0.0, 0.5)}): + fig = plt.figure() + fig.add_subplot(projection='3d') + + + + +Figure and Axes Layout +====================== + +``colorbar`` now has a *location* keyword argument +-------------------------------------------------- + +The ``colorbar`` method now supports a *location* keyword argument to more +easily position the color bar. This is useful when providing your own inset +axes using the *cax* keyword argument and behaves similar to the case where +axes are not provided (where the *location* keyword is passed through). +*orientation* and *ticklocation* are no longer required as they are +determined by *location*. *ticklocation* can still be provided if the +automatic setting is not preferred. (*orientation* can also be provided but +must be compatible with the *location*.) + +An example is: + +.. plot:: + :include-source: true + + import matplotlib.pyplot as plt + import numpy as np + rng = np.random.default_rng(19680801) + imdata = rng.random((10, 10)) + fig, ax = plt.subplots(layout='constrained') + im = ax.imshow(imdata) + fig.colorbar(im, cax=ax.inset_axes([0, 1.05, 1, 0.05]), + location='top') + + + +Figure legends can be placed outside figures using constrained_layout +--------------------------------------------------------------------- +Constrained layout will make space for Figure legends if they are specified +by a *loc* keyword argument that starts with the string "outside". The +codes are unique from axes codes, in that "outside upper right" will +make room at the top of the figure for the legend, whereas +"outside right upper" will make room on the right-hand side of the figure. +See :doc:`/tutorials/intermediate/legend_guide` for details. + + +Per-subplot keyword arguments in ``subplot_mosaic`` +---------------------------------------------------- + +It is now possible to pass keyword arguments through to Axes creation in each +specific call to ``add_subplot`` in `.Figure.subplot_mosaic` and +`.pyplot.subplot_mosaic` : + +.. plot:: + :include-source: true + + fig, axd = plt.subplot_mosaic( + "AB;CD", + per_subplot_kw={ + "A": {"projection": "polar"}, + ("C", "D"): {"xscale": "log"}, + "B": {"projection": "3d"}, + }, + ) + + +This is particularly useful for creating mosaics with mixed projections, but +any keyword arguments can be passed through. + + +``subplot_mosaic`` no longer provisional +---------------------------------------- + +The API on `.Figure.subplot_mosaic` and `.pyplot.subplot_mosaic` are now +considered stable and will change under Matplotlib's normal deprecation +process. + + +Widget Improvements +=================== + + +Custom styling of button widgets +-------------------------------- + +Additional custom styling of button widgets may be achieved via the +*label_props* and *radio_props* arguments to `.RadioButtons`; and the +*label_props*, *frame_props*, and *check_props* arguments to `.CheckButtons`. + +.. plot:: + + from matplotlib.widgets import CheckButtons, RadioButtons + + fig, ax = plt.subplots(nrows=2, ncols=2, figsize=(5, 2), width_ratios=[1, 2]) + default_rb = RadioButtons(ax[0, 0], ['Apples', 'Oranges']) + styled_rb = RadioButtons(ax[0, 1], ['Apples', 'Oranges'], + label_props={'color': ['red', 'orange'], + 'fontsize': [16, 20]}, + radio_props={'edgecolor': ['red', 'orange'], + 'facecolor': ['mistyrose', 'peachpuff']}) + + default_cb = CheckButtons(ax[1, 0], ['Apples', 'Oranges'], + actives=[True, True]) + styled_cb = CheckButtons(ax[1, 1], ['Apples', 'Oranges'], + actives=[True, True], + label_props={'color': ['red', 'orange'], + 'fontsize': [16, 20]}, + frame_props={'edgecolor': ['red', 'orange'], + 'facecolor': ['mistyrose', 'peachpuff']}, + check_props={'color': ['darkred', 'darkorange']}) + + ax[0, 0].set_title('Default') + ax[0, 1].set_title('Stylized') + + +Blitting in Button widgets +-------------------------- + +The `.Button`, `.CheckButtons`, and `.RadioButtons` widgets now support +blitting for faster rendering, on backends that support it, by passing +``useblit=True`` to the constructor. Blitting is enabled by default on +supported backends. + + +Other Improvements +================== + + +Source links can be shown or hidden for each Sphinx plot directive +------------------------------------------------------------------ +The :doc:`Sphinx plot directive ` +(``.. plot::``) now supports a ``:show-source-link:`` option to show or hide +the link to the source code for each plot. The default is set using the +``plot_html_show_source_link`` variable in :file:`conf.py` (which +defaults to True). + + + +Figure hooks +------------ + +The new :rc:`figure.hooks` provides a mechanism to register +arbitrary customizations on pyplot figures; it is a list of +"dotted.module.name:dotted.callable.name" strings specifying functions +that are called on each figure created by `.pyplot.figure`; these +functions can e.g. attach callbacks or modify the toolbar. See +:doc:`/gallery/user_interfaces/mplcvd` for an example of toolbar customization. + + +New & Improved Narrative Documentation +====================================== +* Brand new :doc:`Animations ` tutorial. +* New grouped and stacked `bar chart <../../gallery/index.html#lines_bars_and_markers>`_ examples. +* New section for new contributors and reorganized git instructions in the :ref:`contributing guide`. +* Restructured :doc:`/tutorials/text/annotations` tutorial. diff --git a/doc/users/release_notes.rst b/doc/users/release_notes.rst index 393efc88b711..cf41d6de8a06 100644 --- a/doc/users/release_notes.rst +++ b/doc/users/release_notes.rst @@ -9,6 +9,17 @@ Release notes .. include from another document so that it's easy to exclude this for releases .. include:: release_notes_next.rst + +Version 3.7 +=========== +.. toctree:: + :maxdepth: 1 + + prev_whats_new/whats_new_3.7.0.rst + ../api/prev_api_changes/api_changes_3.7.0.rst + github_stats.rst + + Version 3.6 =========== .. toctree:: @@ -17,7 +28,7 @@ Version 3.6 prev_whats_new/whats_new_3.6.0.rst ../api/prev_api_changes/api_changes_3.6.1.rst ../api/prev_api_changes/api_changes_3.6.0.rst - github_stats.rst + prev_whats_new/github_stats_3.6.3.rst prev_whats_new/github_stats_3.6.2.rst prev_whats_new/github_stats_3.6.1.rst prev_whats_new/github_stats_3.6.0.rst diff --git a/examples/README.txt b/examples/README.txt index 87098fb881ce..8e41fb83d300 100644 --- a/examples/README.txt +++ b/examples/README.txt @@ -9,6 +9,6 @@ Examples This page contains example plots. Click on any image to see the full image and source code. -For longer tutorials, see our `tutorials page <../tutorials/index.html>`_. -You can also find `external resources <../users/resources/index.html>`_ and -a `FAQ <../users/faq/index.html>`_ in our `user guide <../users/index.html>`_. +For longer tutorials, see our :ref:`tutorials page `. +You can also find :ref:`external resources ` and +a :ref:`FAQ ` in our :ref:`user guide `. diff --git a/lib/matplotlib/path.py b/lib/matplotlib/path.py index 75ef7fc4589a..1f65632c2d62 100644 --- a/lib/matplotlib/path.py +++ b/lib/matplotlib/path.py @@ -937,7 +937,7 @@ def arc(cls, theta1, theta2, n=None, is_wedge=False): Masionobe, L. 2003. `Drawing an elliptical arc using polylines, quadratic or cubic Bezier curves - `_. + `_. """ halfpi = np.pi * 0.5 diff --git a/tutorials/README.txt b/tutorials/README.txt index 74d339265bdb..da744b3224c7 100644 --- a/tutorials/README.txt +++ b/tutorials/README.txt @@ -7,6 +7,6 @@ This page contains more in-depth guides for using Matplotlib. It is broken up into beginner, intermediate, and advanced sections, as well as sections covering specific topics. -For shorter examples, see our `examples page <../gallery/index.html>`_. -You can also find `external resources <../resources/index.html>`_ and -a `FAQ <../faq/index.html>`_ in our `user guide <../contents.html>`_. +For shorter examples, see our :ref:`examples page `. +You can also find :ref:`external resources ` and +a :ref:`FAQ ` in our :ref:`user guide `. From 1b5c3fb2d7cfb449434bb944c9b3ebe46f89f66e Mon Sep 17 00:00:00 2001 From: Kyle Sunden Date: Fri, 10 Feb 2023 15:23:50 -0600 Subject: [PATCH 2/3] Merge pull request #24781 from tacaswell/mnt/restore_doc_sha DOC: restore SHA to footer (cherry picked from commit 73909bcb408886a22e2b84581d6b9e6d9907c813) --- doc/conf.py | 6 ++++++ requirements/doc/doc-requirements.txt | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/doc/conf.py b/doc/conf.py index 2b5bc9f2bb6f..b77dfa3ba85f 100644 --- a/doc/conf.py +++ b/doc/conf.py @@ -270,6 +270,11 @@ def gallery_image_warning_filter(record): except (subprocess.CalledProcessError, FileNotFoundError): SHA = matplotlib.__version__ + +html_context = { + "doc_version": SHA, +} + project = 'Matplotlib' copyright = ( '2002–2012 John Hunter, Darren Dale, Eric Firing, Michael Droettboom ' @@ -404,6 +409,7 @@ def js_tag_with_cache_busting(js): "image_dark": "images/logo_dark.svg"}, "navbar_end": ["theme-switcher", "version-switcher", "mpl_icon_links"], "secondary_sidebar_items": "page-toc.html", + "footer_items": ["copyright", "sphinx-version", "doc_version"], } include_analytics = is_release_build if include_analytics: diff --git a/requirements/doc/doc-requirements.txt b/requirements/doc/doc-requirements.txt index f4db1699fc5c..9622bdab289f 100644 --- a/requirements/doc/doc-requirements.txt +++ b/requirements/doc/doc-requirements.txt @@ -14,7 +14,7 @@ ipywidgets numpydoc>=1.0 packaging>=20 pydata-sphinx-theme>=0.12.0 -mpl-sphinx-theme +mpl-sphinx-theme>=3.7.0 sphinxcontrib-svg2pdfconverter>=1.1.0 sphinx-gallery>=0.10 sphinx-copybutton From ddef53603582c3ccc4a3130df25df5183d5d0e6c Mon Sep 17 00:00:00 2001 From: Kyle Sunden Date: Mon, 13 Feb 2023 14:22:13 -0600 Subject: [PATCH 3/3] DOC: update what's new date for final release date --- doc/users/prev_whats_new/whats_new_3.7.0.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/users/prev_whats_new/whats_new_3.7.0.rst b/doc/users/prev_whats_new/whats_new_3.7.0.rst index cbbcd50c7e6a..af464da50969 100644 --- a/doc/users/prev_whats_new/whats_new_3.7.0.rst +++ b/doc/users/prev_whats_new/whats_new_3.7.0.rst @@ -1,5 +1,5 @@ ============================================= -What's new in Matplotlib 3.7.0 (Feb 10, 2023) +What's new in Matplotlib 3.7.0 (Feb 13, 2023) ============================================= For a list of all of the issues and pull requests since the last revision, see pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy