From e885917a4af3e1c4f4005d5b5648b4f564bb438a Mon Sep 17 00:00:00 2001 From: Elliott Sales de Andrade Date: Wed, 24 Aug 2022 02:31:57 -0400 Subject: [PATCH 1/8] Consolidate development API changes for 3.6 --- .../next_api_changes/development/21415-AL.rst | 2 - .../next_api_changes/development/22205-ES.rst | 15 ------- .../next_api_changes/development/22550-AL.rst | 2 - .../prev_api_changes/api_changes_3.6.0.rst | 8 ++++ .../api_changes_3.6.0/development.rst | 42 +++++++++++++++++++ doc/users/release_notes.rst | 8 ++++ 6 files changed, 58 insertions(+), 19 deletions(-) delete mode 100644 doc/api/next_api_changes/development/21415-AL.rst delete mode 100644 doc/api/next_api_changes/development/22205-ES.rst delete mode 100644 doc/api/next_api_changes/development/22550-AL.rst create mode 100644 doc/api/prev_api_changes/api_changes_3.6.0.rst create mode 100644 doc/api/prev_api_changes/api_changes_3.6.0/development.rst diff --git a/doc/api/next_api_changes/development/21415-AL.rst b/doc/api/next_api_changes/development/21415-AL.rst deleted file mode 100644 index 1fdf2e487160..000000000000 --- a/doc/api/next_api_changes/development/21415-AL.rst +++ /dev/null @@ -1,2 +0,0 @@ -``gui_support.macosx`` setup option has been renamed to ``packages.macosx`` -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/doc/api/next_api_changes/development/22205-ES.rst b/doc/api/next_api_changes/development/22205-ES.rst deleted file mode 100644 index 4ed8793cfaa9..000000000000 --- a/doc/api/next_api_changes/development/22205-ES.rst +++ /dev/null @@ -1,15 +0,0 @@ -Increase to minimum supported versions of Python and dependencies -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -For Matplotlib 3.6, the :ref:`minimum supported versions ` are -being bumped: - -+------------+-----------------+---------------+ -| Dependency | min in mpl3.5 | min in mpl3.6 | -+============+=================+===============+ -| Python | 3.7 | 3.8 | -| NumPy | 1.17 | 1.19 | -+------------+-----------------+---------------+ - -This is consistent with our :ref:`min_deps_policy` and `NEP29 -`__ diff --git a/doc/api/next_api_changes/development/22550-AL.rst b/doc/api/next_api_changes/development/22550-AL.rst deleted file mode 100644 index 444254e43baa..000000000000 --- a/doc/api/next_api_changes/development/22550-AL.rst +++ /dev/null @@ -1,2 +0,0 @@ -sphinx>=3.0 and numpydoc>=1.0 are now required for building the docs -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/doc/api/prev_api_changes/api_changes_3.6.0.rst b/doc/api/prev_api_changes/api_changes_3.6.0.rst new file mode 100644 index 000000000000..207223613d44 --- /dev/null +++ b/doc/api/prev_api_changes/api_changes_3.6.0.rst @@ -0,0 +1,8 @@ +API Changes for 3.6.0 +===================== + +.. contents:: + :local: + :depth: 1 + +.. include:: /api/prev_api_changes/api_changes_3.6.0/development.rst diff --git a/doc/api/prev_api_changes/api_changes_3.6.0/development.rst b/doc/api/prev_api_changes/api_changes_3.6.0/development.rst new file mode 100644 index 000000000000..fb9f1f3e21c5 --- /dev/null +++ b/doc/api/prev_api_changes/api_changes_3.6.0/development.rst @@ -0,0 +1,42 @@ +Development changes +------------------- + +Increase to minimum supported versions of dependencies +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +For Matplotlib 3.6, the :ref:`minimum supported versions ` are +being bumped: + ++------------+-----------------+---------------+ +| Dependency | min in mpl3.5 | min in mpl3.6 | ++============+=================+===============+ +| Python | 3.7 | 3.8 | ++------------+-----------------+---------------+ +| NumPy | 1.17 | 1.19 | ++------------+-----------------+---------------+ + +This is consistent with our :ref:`min_deps_policy` and `NEP29 +`__ + +Build setup options changes +~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +The ``gui_support.macosx`` setup option has been renamed to +``packages.macosx``. + +New wheel architectures +~~~~~~~~~~~~~~~~~~~~~~~ + +Wheels have been added for: + +- Python 3.11 +- PyPy 3.8 and 3.9 + +Increase to required versions of documentation dependencies +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +`sphinx`_ >= 3.0 and `numpydoc`_ >= 1.0 are now required for building the +documentation. + +.. _numpydoc: https://pypi.org/project/numpydoc/ +.. _sphinx: https://pypi.org/project/Sphinx/ diff --git a/doc/users/release_notes.rst b/doc/users/release_notes.rst index 397332186bea..f0fbd5a32de0 100644 --- a/doc/users/release_notes.rst +++ b/doc/users/release_notes.rst @@ -9,6 +9,14 @@ Release notes .. include from another document so that it's easy to exclude this for releases .. include:: release_notes_next.rst +Version 3.6 +=========== +.. toctree:: + :maxdepth: 1 + + ../api/prev_api_changes/api_changes_3.6.0.rst + github_stats.rst + Version 3.5 =========== .. toctree:: From ae50333b863c274b64ca457cb6e7e3936c471a09 Mon Sep 17 00:00:00 2001 From: Elliott Sales de Andrade Date: Sat, 3 Sep 2022 01:58:06 -0400 Subject: [PATCH 2/8] Consolidate API removals for 3.6 --- .../deprecations/22098-AL.rst | 13 - .../deprecations/22298-GL.rst | 5 - .../{removals => deprecations}/22465-AL.rst | 0 .../next_api_changes/removals/00001-DS.rst | 28 --- .../next_api_changes/removals/20990-AL.rst | 4 - .../next_api_changes/removals/21395-AL.rst | 3 - .../next_api_changes/removals/21591-AL.rst | 6 - .../next_api_changes/removals/21980-CC.rst | 6 - .../next_api_changes/removals/22081-AL.rst | 14 -- .../next_api_changes/removals/22107-OG.rst | 45 ---- .../next_api_changes/removals/22365-OG.rst | 5 - .../next_api_changes/removals/22486-OG.rst | 7 - .../next_api_changes/removals/22514-OG.rst | 6 - .../next_api_changes/removals/22516-OG.rst | 20 -- .../next_api_changes/removals/22738-JL.rst | 10 - .../next_api_changes/removals/22886-OG.rst | 7 - .../next_api_changes/removals/22952-TH.rst | 5 - .../next_api_changes/removals/23076-GL.rst | 4 - .../next_api_changes/removals/23077-GL.rst | 4 - .../next_api_changes/removals/23078-GL.rst | 4 - .../next_api_changes/removals/23079-GL.rst | 5 - .../next_api_changes/removals/23093-GL.rst | 50 ---- .../next_api_changes/removals/23237-AL.rst | 4 - .../next_api_changes/removals/23291-AL.rst | 4 - .../next_api_changes/removals/23594-OG.rst | 4 - .../prev_api_changes/api_changes_3.6.0.rst | 2 + .../api_changes_3.6.0/removals.rst | 222 ++++++++++++++++++ 27 files changed, 224 insertions(+), 263 deletions(-) delete mode 100644 doc/api/next_api_changes/deprecations/22098-AL.rst delete mode 100644 doc/api/next_api_changes/deprecations/22298-GL.rst rename doc/api/next_api_changes/{removals => deprecations}/22465-AL.rst (100%) delete mode 100644 doc/api/next_api_changes/removals/00001-DS.rst delete mode 100644 doc/api/next_api_changes/removals/20990-AL.rst delete mode 100644 doc/api/next_api_changes/removals/21395-AL.rst delete mode 100644 doc/api/next_api_changes/removals/21591-AL.rst delete mode 100644 doc/api/next_api_changes/removals/21980-CC.rst delete mode 100644 doc/api/next_api_changes/removals/22081-AL.rst delete mode 100644 doc/api/next_api_changes/removals/22107-OG.rst delete mode 100644 doc/api/next_api_changes/removals/22365-OG.rst delete mode 100644 doc/api/next_api_changes/removals/22486-OG.rst delete mode 100644 doc/api/next_api_changes/removals/22514-OG.rst delete mode 100644 doc/api/next_api_changes/removals/22516-OG.rst delete mode 100644 doc/api/next_api_changes/removals/22738-JL.rst delete mode 100644 doc/api/next_api_changes/removals/22886-OG.rst delete mode 100644 doc/api/next_api_changes/removals/22952-TH.rst delete mode 100644 doc/api/next_api_changes/removals/23076-GL.rst delete mode 100644 doc/api/next_api_changes/removals/23077-GL.rst delete mode 100644 doc/api/next_api_changes/removals/23078-GL.rst delete mode 100644 doc/api/next_api_changes/removals/23079-GL.rst delete mode 100644 doc/api/next_api_changes/removals/23093-GL.rst delete mode 100644 doc/api/next_api_changes/removals/23237-AL.rst delete mode 100644 doc/api/next_api_changes/removals/23291-AL.rst delete mode 100644 doc/api/next_api_changes/removals/23594-OG.rst create mode 100644 doc/api/prev_api_changes/api_changes_3.6.0/removals.rst diff --git a/doc/api/next_api_changes/deprecations/22098-AL.rst b/doc/api/next_api_changes/deprecations/22098-AL.rst deleted file mode 100644 index 67672bfe788e..000000000000 --- a/doc/api/next_api_changes/deprecations/22098-AL.rst +++ /dev/null @@ -1,13 +0,0 @@ -``axes_grid`` and ``axisartist`` removals -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -The following deprecated APIs have been removed: - -- ``SubplotDivider.figbox``, ``SubplotDivider.update_params``, -- ``SubplotDivider.get_geometry`` (use ``get_subplotspec`` instead), -- ``change_geometry`` (use ``set_subplotspec`` instead), -- ``ParasiteAxesBase.update_viewlim`` (use ``apply_aspect`` instead), -- ``ParasiteAxesAuxTransBase`` (use ``ParasiteAxesBase`` instead), -- ``parasite_axes_auxtrans_class_factory`` (use ``parasite_axes_class_factory`` - instead), -- ``ParasiteAxesAuxTrans`` (use ``ParasiteAxes`` instead), diff --git a/doc/api/next_api_changes/deprecations/22298-GL.rst b/doc/api/next_api_changes/deprecations/22298-GL.rst deleted file mode 100644 index 814f7c4e48bc..000000000000 --- a/doc/api/next_api_changes/deprecations/22298-GL.rst +++ /dev/null @@ -1,5 +0,0 @@ -``cmap_d`` removal -~~~~~~~~~~~~~~~~~~ - -The deprecated ``matplotlib.cm.cmap_d`` access to global colormaps -has been removed. diff --git a/doc/api/next_api_changes/removals/22465-AL.rst b/doc/api/next_api_changes/deprecations/22465-AL.rst similarity index 100% rename from doc/api/next_api_changes/removals/22465-AL.rst rename to doc/api/next_api_changes/deprecations/22465-AL.rst diff --git a/doc/api/next_api_changes/removals/00001-DS.rst b/doc/api/next_api_changes/removals/00001-DS.rst deleted file mode 100644 index fcf6166e3970..000000000000 --- a/doc/api/next_api_changes/removals/00001-DS.rst +++ /dev/null @@ -1,28 +0,0 @@ -Removal of mplot3d deprecations -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -The deprecated ``renderer`` arguments have been removed from: - -- `.Line3DCollection.do_3d_projection` -- `.Patch3D.do_3d_projection` -- `.PathPatch3D.do_3d_projection` -- `.Path3DCollection.do_3d_projection` -- `.Patch3DCollection.do_3d_projection` -- `.Poly3DCollection.do_3d_projection` - -The deprecated ``project`` argument has also been removed from -``Line3DCollection.draw()``. - -Passing arguments not specifically listed in the signatures of -`.Axes3D.plot_surface` and `.Axes3D.plot_wireframe` is no longer supported. -Pass any extra arguments as keyword arguments instead. - -These properties of the 3D Axes that were placed on the Renderer during draw -have been removed: - -* ``renderer.M`` -* ``renderer.eye`` -* ``renderer.vvec`` -* ``renderer.get_axis_position`` - -These attributes are all available via `.Axes3D`, which can be accessed via -``self.axes`` on all `.Artist`\s. diff --git a/doc/api/next_api_changes/removals/20990-AL.rst b/doc/api/next_api_changes/removals/20990-AL.rst deleted file mode 100644 index 29e24786be85..000000000000 --- a/doc/api/next_api_changes/removals/20990-AL.rst +++ /dev/null @@ -1,4 +0,0 @@ -Support for passing tool names to ``ToolManager.add_tool`` -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -... has been removed. The second parameter to add_tool must now always be a -tool class. diff --git a/doc/api/next_api_changes/removals/21395-AL.rst b/doc/api/next_api_changes/removals/21395-AL.rst deleted file mode 100644 index 8983b8b65819..000000000000 --- a/doc/api/next_api_changes/removals/21395-AL.rst +++ /dev/null @@ -1,3 +0,0 @@ -Unknown keyword arguments to ``savefig`` and ``FigureCanvas.print_foo`` methods -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -... now raise a TypeError, instead of being ignored. diff --git a/doc/api/next_api_changes/removals/21591-AL.rst b/doc/api/next_api_changes/removals/21591-AL.rst deleted file mode 100644 index b2534b47818f..000000000000 --- a/doc/api/next_api_changes/removals/21591-AL.rst +++ /dev/null @@ -1,6 +0,0 @@ -``backend_tools.ToolFullScreen`` now inherits from ``ToolBase``, not from ``ToolToggleBase`` -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -`.ToolFullScreen` can only switch between the non-fullscreen -and fullscreen states, but not unconditionally put the window in a given state; -hence the ``enable`` and ``disable`` methods were misleadingly named. Thus, -the `.ToolToggleBase`-related API (``enable``, ``disable``, etc.) was removed. diff --git a/doc/api/next_api_changes/removals/21980-CC.rst b/doc/api/next_api_changes/removals/21980-CC.rst deleted file mode 100644 index b95029b92a3e..000000000000 --- a/doc/api/next_api_changes/removals/21980-CC.rst +++ /dev/null @@ -1,6 +0,0 @@ -Removed loaded modules logging -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -The list of currently loaded modules is no longer logged at the DEBUG level at Matplotlib import time, -because it can produce extensive output and make other valuable DEBUG statements difficult to find. -If you were relying on this please arrange for your own logging (the built-in `sys.modules` can be used to get the currently loaded modules). diff --git a/doc/api/next_api_changes/removals/22081-AL.rst b/doc/api/next_api_changes/removals/22081-AL.rst deleted file mode 100644 index b525da4a5542..000000000000 --- a/doc/api/next_api_changes/removals/22081-AL.rst +++ /dev/null @@ -1,14 +0,0 @@ -colorbar defaults to stealing space from the mappable's axes rather than the current axes -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -If the mappable does not have an Axes, then an error will be raised. - -Pass the *cax* or *ax* argument to be explicit about where the colorbar will be -placed. Passing ``ax=plt.gca()`` will restore the previous behavior. - -Removal of deprecated ``colorbar`` APIs -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -The following deprecated :mod:`.colorbar` APIs have been removed: -``ColorbarPatch`` and ``colorbar_factory`` (use `.Colorbar` instead); -``colorbar_doc``, ``colorbar_kw_doc``, ``make_axes_kw_doc``. diff --git a/doc/api/next_api_changes/removals/22107-OG.rst b/doc/api/next_api_changes/removals/22107-OG.rst deleted file mode 100644 index 7a068e501343..000000000000 --- a/doc/api/next_api_changes/removals/22107-OG.rst +++ /dev/null @@ -1,45 +0,0 @@ -Removal of deprecated ``mathtext`` APIs -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -The following `matplotlib.mathtext` APIs have been removed: - -- ``Fonts`` and all its subclasses, -- ``FontConstantsBase`` and all its subclasses, -- ``Node`` and all its subclasses, -- ``Ship``, ``ship``, -- ``Error``, -- ``Parser``, -- ``SHRINK_FACTOR``, ``GROW_FACTOR``, -- ``NUM_SIZE_LEVELS``, -- ``latex_to_bakoma``, ``latex_to_cmex``, ``latex_to_standard``, -- ``stix_virtual_fonts``, -- ``tex2uni`` - -Removal of various ``mathtext`` helpers -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -The following `matplotlib.mathtext` classes: - -- ``MathtextBackendPdf``, -- ``MathtextBackendPs``, -- ``MathtextBackendSvg``, -- ``MathtextBackendCairo``, - -and the ``.mathtext_parser`` attributes on - -- `.RendererPdf`, -- `.RendererPS`, -- `.RendererSVG`, -- `.RendererCairo` - -have been removed. The `.MathtextBackendPath` class can be used instead. - -The methods ``get_depth``, ``parse``, ``to_mask``, ``to_rgba``, and ``to_png`` -of `.MathTextParser` have been removed. Use `.mathtext.math_to_image` instead. - -The unused ``StandardPsFonts.pswriter`` has been removed. - -``ps.useafm`` removed for ``mathtext`` -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -The setting :rc:`ps.useafm` no longer has any effect on `matplotlib.mathtext`. diff --git a/doc/api/next_api_changes/removals/22365-OG.rst b/doc/api/next_api_changes/removals/22365-OG.rst deleted file mode 100644 index 071282e7569a..000000000000 --- a/doc/api/next_api_changes/removals/22365-OG.rst +++ /dev/null @@ -1,5 +0,0 @@ -Removal of deprecated ``MovieWriter.cleanup`` -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -The cleanup logic is instead fully implemented in `.MovieWriter.finish` and -``cleanup`` is no longer called. diff --git a/doc/api/next_api_changes/removals/22486-OG.rst b/doc/api/next_api_changes/removals/22486-OG.rst deleted file mode 100644 index 7b143d873c98..000000000000 --- a/doc/api/next_api_changes/removals/22486-OG.rst +++ /dev/null @@ -1,7 +0,0 @@ -Removal of deprecated methods and properties in ``lines`` and ``patches`` -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -The deprecated properties ``validCap`` and ``validJoin`` have been removed -from `~.Line2D` and `~.Patch` as the validation is centralized in ``rcsetup``. -The deprecated methods ``get_dpi_cor`` and ``set_dpi_cor`` have been removed -from `~.FancyArrowPatch` as the parameter ``dpi_cor`` is removed. diff --git a/doc/api/next_api_changes/removals/22514-OG.rst b/doc/api/next_api_changes/removals/22514-OG.rst deleted file mode 100644 index c426dd4e5c27..000000000000 --- a/doc/api/next_api_changes/removals/22514-OG.rst +++ /dev/null @@ -1,6 +0,0 @@ -Removal of deprecations in ``cbook`` -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -The module ``cbook.deprecation`` is removed from the public API as it is -considered internal. This also holds for deprecation-related re-imports in -``cbook``: ``deprecated``, and ``warn_deprecated``. diff --git a/doc/api/next_api_changes/removals/22516-OG.rst b/doc/api/next_api_changes/removals/22516-OG.rst deleted file mode 100644 index 32068fdcdf4b..000000000000 --- a/doc/api/next_api_changes/removals/22516-OG.rst +++ /dev/null @@ -1,20 +0,0 @@ -Removal of deprecations in ``backends`` -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -The parameter ``resize_callback`` is removed from the Tk backend. Instead, -use ``get_tk_widget().bind('', ..., True)``. - -The ``get_content_extents()`` and ``tostring_rgba_minimized()`` methods are -removed from the Agg backend with no replacements. - -The parameter ``dpi`` is removed from ``print_ps()`` in the PS backend and -``print_pdf()`` in the PDF backend. Instead, the methods obtain the DPI from -the ``savefig`` machinery. - -The classes ``TmpDirCleaner`` and ``GraphicsContextPS`` are removed from the -PGF and PS backends, respectively. For the latter, ``GraphicsContextBase`` can -be used as a replacement. - -In the WX backend, the property ``IDLE_DELAY`` is removed. In addition, the -parameter ``origin`` of ``gui_repaint()`` is removed, as well as the method -``get_canvas()``. No replacements are provided. diff --git a/doc/api/next_api_changes/removals/22738-JL.rst b/doc/api/next_api_changes/removals/22738-JL.rst deleted file mode 100644 index c1f50cd9d700..000000000000 --- a/doc/api/next_api_changes/removals/22738-JL.rst +++ /dev/null @@ -1,10 +0,0 @@ -Removal of deprecated methods in `matplotlib.projections.polar` -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -The ``cla`` method in both ``ThetaAxis`` and ``RadialAxis`` has been removed -after being deprecated in 3.4. Use ``clear`` instead. - -Removal of deprecated methods in `matplotlib.spines` -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -The ``cla`` method in ``Spine`` is removed after being deprecated in 3.4. -Use ``clear`` instead. diff --git a/doc/api/next_api_changes/removals/22886-OG.rst b/doc/api/next_api_changes/removals/22886-OG.rst deleted file mode 100644 index 8ce155835fa1..000000000000 --- a/doc/api/next_api_changes/removals/22886-OG.rst +++ /dev/null @@ -1,7 +0,0 @@ -``mpl_toolkits.axes_grid`` module removed -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -All functionally from ``mpl_toolkits.axes_grid`` can be found in either -`mpl_toolkits.axes_grid1` or `mpl_toolkits.axisartist`. Axes classes -from ``mpl_toolkits.axes_grid`` based on ``Axis`` from -`mpl_toolkits.axisartist` can be found in `mpl_toolkits.axisartist`. diff --git a/doc/api/next_api_changes/removals/22952-TH.rst b/doc/api/next_api_changes/removals/22952-TH.rst deleted file mode 100644 index 3838be4fc503..000000000000 --- a/doc/api/next_api_changes/removals/22952-TH.rst +++ /dev/null @@ -1,5 +0,0 @@ -MarkerStyle is immutable -~~~~~~~~~~~~~~~~~~~~~~~~ -The methods ``MarkerStyle.set_fillstyle()`` and ``MarkerStyle.set_marker()`` -have been removed. Create a new `.MarkerStyle` with the respective parameters -instead. diff --git a/doc/api/next_api_changes/removals/23076-GL.rst b/doc/api/next_api_changes/removals/23076-GL.rst deleted file mode 100644 index 8d17b05b0c0f..000000000000 --- a/doc/api/next_api_changes/removals/23076-GL.rst +++ /dev/null @@ -1,4 +0,0 @@ -Passing positional arguments to LineCollection has been removed -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -Use specific keyword argument names now. diff --git a/doc/api/next_api_changes/removals/23077-GL.rst b/doc/api/next_api_changes/removals/23077-GL.rst deleted file mode 100644 index 847d15260537..000000000000 --- a/doc/api/next_api_changes/removals/23077-GL.rst +++ /dev/null @@ -1,4 +0,0 @@ -Keyword arguments to ``gca()`` have been removed -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -There is no replacement. diff --git a/doc/api/next_api_changes/removals/23078-GL.rst b/doc/api/next_api_changes/removals/23078-GL.rst deleted file mode 100644 index 10d5d4604242..000000000000 --- a/doc/api/next_api_changes/removals/23078-GL.rst +++ /dev/null @@ -1,4 +0,0 @@ -``Axis.cla()`` has been removed -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -Use `.Axis.clear()` instead. diff --git a/doc/api/next_api_changes/removals/23079-GL.rst b/doc/api/next_api_changes/removals/23079-GL.rst deleted file mode 100644 index c71e6ad7b805..000000000000 --- a/doc/api/next_api_changes/removals/23079-GL.rst +++ /dev/null @@ -1,5 +0,0 @@ -``key_press`` and ``button_press`` have been removed from FigureManager -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -Trigger the events directly on the canvas using -``canvas.callbacks.process(event.name, event)`` for key and button events. diff --git a/doc/api/next_api_changes/removals/23093-GL.rst b/doc/api/next_api_changes/removals/23093-GL.rst deleted file mode 100644 index a155c29830cf..000000000000 --- a/doc/api/next_api_changes/removals/23093-GL.rst +++ /dev/null @@ -1,50 +0,0 @@ -Get/set window title methods have been removed from the canvas -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -Use the corresponding methods on the FigureManager if using pyplot, -or GUI-specific methods if embedding. - -``ContourLabeler.get_label_coords()`` has been removed -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -There is no replacement, it was considered an internal helper. - -The **return_all** keyword argument has been removed from ``gridspec.get_position()`` -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -The **minimum_descent** has been removed from ``TextArea`` -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -The minimum_descent is now effectively always True. - -Extra parameters to Axes constructor -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -Parameters of the Axes constructor other than *fig* and *rect* are now keyword only. - -``sphinext.plot_directive.align`` has been removed -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -Use ``docutils.parsers.rst.directives.images.Image.align`` instead. - -``imread()`` no longer accepts URLs -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -Passing a URL to `~.pyplot.imread()` has been removed. Please open the URL for -reading and directly use the Pillow API -(``PIL.Image.open(urllib.request.urlopen(url))``, or -``PIL.Image.open(io.BytesIO(requests.get(url).content))``) instead. - -Deprecated properties of widgets have been removed -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -These include ``cids``, ``cnt``, ``observers``, ``change_observers``, -and ``submit_observers``. - -Removal of methods and properties of ``Subplot`` -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -These include ``get_geometry()``, ``change_geometry()``, ``figbox``, -``numRows``, ``numCols``, ``update_params()``, ``is_first_row()``, -``is_first_col()``, ``is_last_row()``, ``is_last_col()``. The subplotspec -contains this information and can be used to replace these methods and properties. diff --git a/doc/api/next_api_changes/removals/23237-AL.rst b/doc/api/next_api_changes/removals/23237-AL.rst deleted file mode 100644 index fb11fc68e4aa..000000000000 --- a/doc/api/next_api_changes/removals/23237-AL.rst +++ /dev/null @@ -1,4 +0,0 @@ -``BoxStyle._Base`` and ``transmute`` method of boxstyles -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -... have been removed. Boxstyles implemented as classes no longer need to -inherit from a base class. diff --git a/doc/api/next_api_changes/removals/23291-AL.rst b/doc/api/next_api_changes/removals/23291-AL.rst deleted file mode 100644 index 60a2260fba03..000000000000 --- a/doc/api/next_api_changes/removals/23291-AL.rst +++ /dev/null @@ -1,4 +0,0 @@ -``backend_template.new_figure_manager``, ``backend_template.new_figure_manager_given_figure``, and ``backend_template.draw_if_interactive`` -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -... have been removed, as part of the introduction of the simplified backend -API. diff --git a/doc/api/next_api_changes/removals/23594-OG.rst b/doc/api/next_api_changes/removals/23594-OG.rst deleted file mode 100644 index 68faf06ea6dd..000000000000 --- a/doc/api/next_api_changes/removals/23594-OG.rst +++ /dev/null @@ -1,4 +0,0 @@ -Passing bytes to ``FT2Font.set_text`` -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -... is no longer supported. Pass str instead. diff --git a/doc/api/prev_api_changes/api_changes_3.6.0.rst b/doc/api/prev_api_changes/api_changes_3.6.0.rst index 207223613d44..920c06733bce 100644 --- a/doc/api/prev_api_changes/api_changes_3.6.0.rst +++ b/doc/api/prev_api_changes/api_changes_3.6.0.rst @@ -5,4 +5,6 @@ API Changes for 3.6.0 :local: :depth: 1 +.. include:: /api/prev_api_changes/api_changes_3.6.0/removals.rst + .. include:: /api/prev_api_changes/api_changes_3.6.0/development.rst diff --git a/doc/api/prev_api_changes/api_changes_3.6.0/removals.rst b/doc/api/prev_api_changes/api_changes_3.6.0/removals.rst new file mode 100644 index 000000000000..60b1771eea09 --- /dev/null +++ b/doc/api/prev_api_changes/api_changes_3.6.0/removals.rst @@ -0,0 +1,222 @@ +Removals +-------- + +The following deprecated APIs have been removed: + +Removed behaviour +~~~~~~~~~~~~~~~~~ + +Stricter validation of function parameters +.......................................... + +- Unknown keyword arguments to `.Figure.savefig`, `.pyplot.savefig`, and the + ``FigureCanvas.print_*`` methods now raise a `TypeError`, instead of being + ignored. +- Extra parameters to the `~.axes.Axes` constructor, i.e., those other than + *fig* and *rect*, are now keyword only. +- Passing arguments not specifically listed in the signatures of + `.Axes3D.plot_surface` and `.Axes3D.plot_wireframe` is no longer supported; + pass any extra arguments as keyword arguments instead. +- Passing positional arguments to `.LineCollection` has been removed; use + specific keyword argument names now. + +``imread`` no longer accepts URLs +................................. + +Passing a URL to `~.pyplot.imread()` has been removed. Please open the URL for +reading and directly use the Pillow API (e.g., +``PIL.Image.open(urllib.request.urlopen(url))``, or +``PIL.Image.open(io.BytesIO(requests.get(url).content))``) instead. + +MarkerStyle is immutable +........................ + +The methods ``MarkerStyle.set_fillstyle`` and ``MarkerStyle.set_marker`` have +been removed. Create a new `.MarkerStyle` with the respective parameters +instead. + +Passing bytes to ``FT2Font.set_text`` +..................................... + +... is no longer supported. Pass `str` instead. + +Support for passing tool names to ``ToolManager.add_tool`` +.......................................................... + +... has been removed. The second parameter to `.ToolManager.add_tool` must now +always be a tool class. + +``backend_tools.ToolFullScreen`` now inherits from ``ToolBase``, not from ``ToolToggleBase`` +............................................................................................ + +`.ToolFullScreen` can only switch between the non-fullscreen and fullscreen +states, but not unconditionally put the window in a given state; hence the +``enable`` and ``disable`` methods were misleadingly named. Thus, the +`.ToolToggleBase`-related API (``enable``, ``disable``, etc.) was removed. + +``BoxStyle._Base`` and ``transmute`` method of box styles +......................................................... + +... have been removed. Box styles implemented as classes no longer need to +inherit from a base class. + +Loaded modules logging +...................... + +The list of currently loaded modules is no longer logged at the DEBUG level at +Matplotlib import time, because it can produce extensive output and make other +valuable DEBUG statements difficult to find. If you were relying on this +output, please arrange for your own logging (the built-in `sys.modules` can be +used to get the currently loaded modules). + +Modules +~~~~~~~ + +- The ``cbook.deprecation`` module has been removed from the public API as it + is considered internal. +- The ``mpl_toolkits.axes_grid`` module has been removed. All functionality from + ``mpl_toolkits.axes_grid`` can be found in either `mpl_toolkits.axes_grid1` + or `mpl_toolkits.axisartist`. Axes classes from ``mpl_toolkits.axes_grid`` + based on ``Axis`` from `mpl_toolkits.axisartist` can be found in + `mpl_toolkits.axisartist`. + +Classes, methods and attributes +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +The following module-level classes/variables have been removed: + +- ``cm.cmap_d`` +- ``colorbar.colorbar_doc``, ``colorbar.colorbar_kw_doc`` +- ``ColorbarPatch`` +- ``mathtext.Fonts`` and all its subclasses +- ``mathtext.FontConstantsBase`` and all its subclasses +- ``mathtext.latex_to_bakoma``, ``mathtext.latex_to_cmex``, + ``mathtext.latex_to_standard`` +- ``mathtext.MathtextBackendPdf``, ``mathtext.MathtextBackendPs``, + ``mathtext.MathtextBackendSvg``, ``mathtext.MathtextBackendCairo``; use + `.MathtextBackendPath` instead. +- ``mathtext.Node`` and all its subclasses +- ``mathtext.NUM_SIZE_LEVELS`` +- ``mathtext.Parser`` +- ``mathtext.Ship`` +- ``mathtext.SHRINK_FACTOR`` and ``mathtext.GROW_FACTOR`` +- ``mathtext.stix_virtual_fonts``, +- ``mathtext.tex2uni`` +- ``backend_pgf.TmpDirCleaner`` +- ``backend_ps.GraphicsContextPS``; use ``GraphicsContextBase`` instead. +- ``backend_wx.IDLE_DELAY`` +- ``axes_grid1.parasite_axes.ParasiteAxesAuxTransBase``; use + `.ParasiteAxesBase` instead. +- ``axes_grid1.parasite_axes.ParasiteAxesAuxTrans``; use `.ParasiteAxes` + instead. + +The following class attributes have been removed: + +- ``Line2D.validCap`` and ``Line2D.validJoin``; validation is centralized in + ``rcsetup``. +- ``Patch.validCap`` and ``Patch.validJoin``; validation is centralized in + ``rcsetup``. +- ``renderer.M``, ``renderer.eye``, ``renderer.vvec``, + ``renderer.get_axis_position`` placed on the Renderer during 3D Axes draw; + these attributes are all available via `.Axes3D`, which can be accessed via + ``self.axes`` on all `.Artist`\s. +- ``RendererPdf.mathtext_parser``, ``RendererPS.mathtext_parser``, + ``RendererSVG.mathtext_parser``, ``RendererCairo.mathtext_parser`` +- ``StandardPsFonts.pswriter`` +- ``Subplot.figbox``; use `.Axes.get_position` instead. +- ``Subplot.numRows``; ``ax.get_gridspec().nrows`` instead. +- ``Subplot.numCols``; ``ax.get_gridspec().ncols`` instead. +- ``SubplotDivider.figbox`` +- ``cids``, ``cnt``, ``observers``, ``change_observers``, and + ``submit_observers`` on all `.Widget`\s + +The following class methods have been removed: + +- ``Axis.cla()``; use `.Axis.clear` instead. +- ``RadialAxis.cla()`` and ``ThetaAxis.cla()``; use `.RadialAxis.clear` or + `.ThetaAxis.clear` instead. +- ``Spine.cla()``; use `.Spine.clear` instead. +- ``ContourLabeler.get_label_coords()``; there is no replacement as it was + considered an internal helper. +- ``FancyArrowPatch.get_dpi_cor`` and ``FancyArrowPatch.set_dpi_cor`` + +- ``FigureCanvas.get_window_title()`` and ``FigureCanvas.set_window_title()``; + use `.FigureManagerBase.get_window_title` or + `.FigureManagerBase.set_window_title` if using pyplot, or use GUI-specific + methods if embedding. +- ``FigureManager.key_press()`` and ``FigureManager.button_press()``; trigger + the events directly on the canvas using + ``canvas.callbacks.process(event.name, event)`` for key and button events. + +- ``RendererAgg.get_content_extents()`` and + ``RendererAgg.tostring_rgba_minimized()`` +- ``NavigationToolbar2Wx.get_canvas()`` + +- ``ParasiteAxesBase.update_viewlim()``; use `.ParasiteAxesBase.apply_aspect` + instead. +- ``Subplot.get_geometry()``; use `.SubplotBase.get_subplotspec` instead. +- ``Subplot.change_geometry()``; use `.SubplotBase.set_subplotspec` instead. +- ``Subplot.update_params()``; this method did nothing. +- ``Subplot.is_first_row()``; use ``ax.get_subplotspec().is_first_row`` + instead. +- ``Subplot.is_first_col()``; use ``ax.get_subplotspec().is_first_col`` + instead. +- ``Subplot.is_last_row()``; use ``ax.get_subplotspec().is_last_row`` instead. +- ``Subplot.is_last_col()``; use ``ax.get_subplotspec().is_last_col`` instead. +- ``SubplotDivider.change_geometry()``; use `.SubplotDivider.set_subplotspec` + instead. +- ``SubplotDivider.get_geometry()``; use `.SubplotDivider.get_subplotspec` + instead. +- ``SubplotDivider.update_params()`` +- ``get_depth``, ``parse``, ``to_mask``, ``to_rgba``, and ``to_png`` of + `.MathTextParser`; use `.mathtext.math_to_image` instead. + +- ``MovieWriter.cleanup()``; the cleanup logic is instead fully implemented in + `.MovieWriter.finish` and ``cleanup`` is no longer called. + +Functions +~~~~~~~~~ + +The following functions have been removed; + +- ``backend_template.new_figure_manager()``, + ``backend_template.new_figure_manager_given_figure()``, and + ``backend_template.draw_if_interactive()`` have been removed, as part of the + introduction of the simplified backend API. +- Deprecation-related re-imports ``cbook.deprecated()``, and + ``cbook.warn_deprecated()``. +- ``colorbar.colorbar_factory()``; use `.Colorbar` instead. + ``colorbar.make_axes_kw_doc()`` +- ``mathtext.Error()`` +- ``mathtext.ship()`` +- ``mathtext.tex2uni()`` +- ``axes_grid1.parasite_axes.parasite_axes_auxtrans_class_factory()``; use + `.parasite_axes_class_factory` instead. +- ``sphinext.plot_directive.align()``; use + ``docutils.parsers.rst.directives.images.Image.align`` instead. + +Arguments +~~~~~~~~~ + +The following arguments have been removed: + +- *dpi* from ``print_ps()`` in the PS backend and ``print_pdf()`` in the PDF + backend. Instead, the methods will obtain the DPI from the ``savefig`` + machinery. +- *dpi_cor* from `~.FancyArrowPatch` +- *minimum_descent* from ``TextArea``; it is now effectively always True +- *origin* from ``FigureCanvasWx.gui_repaint()`` +- *project* from ``Line3DCollection.draw()`` +- *renderer* from `.Line3DCollection.do_3d_projection`, + `.Patch3D.do_3d_projection`, `.PathPatch3D.do_3d_projection`, + `.Path3DCollection.do_3d_projection`, `.Patch3DCollection.do_3d_projection`, + `.Poly3DCollection.do_3d_projection` +- *resize_callback* from the Tk backend; use + ``get_tk_widget().bind('', ..., True)`` instead. +- *return_all* from ``gridspec.get_position()`` +- Keyword arguments to ``gca()``; there is no replacement. + +rcParams +~~~~~~~~ + +The setting :rc:`ps.useafm` no longer has any effect on `matplotlib.mathtext`. From 158c6314f7de9ee08413012608d7ec29bbb36c4e Mon Sep 17 00:00:00 2001 From: Elliott Sales de Andrade Date: Sat, 3 Sep 2022 04:17:02 -0400 Subject: [PATCH 3/8] Consolidate behavioural API changes for 3.6 --- doc/api/artist_api.rst | 1 + doc/api/matplotlib_configuration_api.rst | 1 + .../next_api_changes/behavior/19214-DS.rst | 5 - .../next_api_changes/behavior/19368-DS.rst | 8 - .../next_api_changes/behavior/20426-JK.rst | 5 - .../next_api_changes/behavior/20715-JKS.rst | 8 - .../next_api_changes/behavior/21026-DS.rst | 5 - .../next_api_changes/behavior/21042-AL.rst | 5 - .../next_api_changes/behavior/21238-AL.rst | 6 - .../next_api_changes/behavior/21983-AL.rst | 8 - .../next_api_changes/behavior/22013-AL.rst | 5 - .../next_api_changes/behavior/22063-SR.rst | 7 - .../next_api_changes/behavior/22204-AL.rst | 7 - .../next_api_changes/behavior/22229-TAC.rst | 18 -- .../next_api_changes/behavior/22485-TH.rst | 5 - .../next_api_changes/behavior/22567-IT.rst | 13 - .../next_api_changes/behavior/22639-RA.rst | 5 - .../next_api_changes/behavior/22691-JMK.rst | 6 - .../next_api_changes/behavior/22745-JMK.rst | 9 - .../next_api_changes/behavior/22950-AL.rst | 3 - .../next_api_changes/behavior/23031-AL.rst | 5 - .../next_api_changes/behavior/23170-JMK.rst | 6 - .../next_api_changes/behavior/23188-JMK.rst | 9 - .../next_api_changes/behavior/23206-OG.rst | 5 - .../next_api_changes/behavior/23233-TH.rst | 13 - .../next_api_changes/behavior/23270-AL.rst | 5 - .../next_api_changes/behavior/23299-TAC.rst | 6 - .../next_api_changes/behavior/23371-AL.rst | 4 - .../next_api_changes/behavior/23443-AL.rst | 2 - .../next_api_changes/behavior/23475-WLQ.rst | 5 - .../next_api_changes/behavior/23516-MS.rst | 6 - .../next_api_changes/behavior/23550-OG.rst | 10 - .../next_api_changes/behavior/23710-ES.rst | 7 - .../prev_api_changes/api_changes_3.6.0.rst | 2 + .../api_changes_3.6.0/behaviour.rst | 269 ++++++++++++++++++ lib/matplotlib/__init__.py | 1 + 36 files changed, 274 insertions(+), 211 deletions(-) delete mode 100644 doc/api/next_api_changes/behavior/19214-DS.rst delete mode 100644 doc/api/next_api_changes/behavior/19368-DS.rst delete mode 100644 doc/api/next_api_changes/behavior/20426-JK.rst delete mode 100644 doc/api/next_api_changes/behavior/20715-JKS.rst delete mode 100644 doc/api/next_api_changes/behavior/21026-DS.rst delete mode 100644 doc/api/next_api_changes/behavior/21042-AL.rst delete mode 100644 doc/api/next_api_changes/behavior/21238-AL.rst delete mode 100644 doc/api/next_api_changes/behavior/21983-AL.rst delete mode 100644 doc/api/next_api_changes/behavior/22013-AL.rst delete mode 100644 doc/api/next_api_changes/behavior/22063-SR.rst delete mode 100644 doc/api/next_api_changes/behavior/22204-AL.rst delete mode 100644 doc/api/next_api_changes/behavior/22229-TAC.rst delete mode 100644 doc/api/next_api_changes/behavior/22485-TH.rst delete mode 100644 doc/api/next_api_changes/behavior/22567-IT.rst delete mode 100644 doc/api/next_api_changes/behavior/22639-RA.rst delete mode 100644 doc/api/next_api_changes/behavior/22691-JMK.rst delete mode 100644 doc/api/next_api_changes/behavior/22745-JMK.rst delete mode 100644 doc/api/next_api_changes/behavior/22950-AL.rst delete mode 100644 doc/api/next_api_changes/behavior/23031-AL.rst delete mode 100644 doc/api/next_api_changes/behavior/23170-JMK.rst delete mode 100644 doc/api/next_api_changes/behavior/23188-JMK.rst delete mode 100644 doc/api/next_api_changes/behavior/23206-OG.rst delete mode 100644 doc/api/next_api_changes/behavior/23233-TH.rst delete mode 100644 doc/api/next_api_changes/behavior/23270-AL.rst delete mode 100644 doc/api/next_api_changes/behavior/23299-TAC.rst delete mode 100644 doc/api/next_api_changes/behavior/23371-AL.rst delete mode 100644 doc/api/next_api_changes/behavior/23443-AL.rst delete mode 100644 doc/api/next_api_changes/behavior/23475-WLQ.rst delete mode 100644 doc/api/next_api_changes/behavior/23516-MS.rst delete mode 100644 doc/api/next_api_changes/behavior/23550-OG.rst delete mode 100644 doc/api/next_api_changes/behavior/23710-ES.rst create mode 100644 doc/api/prev_api_changes/api_changes_3.6.0/behaviour.rst diff --git a/doc/api/artist_api.rst b/doc/api/artist_api.rst index ca2207e15dca..b99842372bbe 100644 --- a/doc/api/artist_api.rst +++ b/doc/api/artist_api.rst @@ -105,6 +105,7 @@ Drawing Artist.get_agg_filter Artist.get_window_extent + Artist.get_tightbbox Artist.get_transformed_clip_path_and_affine Figure and Axes diff --git a/doc/api/matplotlib_configuration_api.rst b/doc/api/matplotlib_configuration_api.rst index eb9cffb0f93f..d5dc60c80613 100644 --- a/doc/api/matplotlib_configuration_api.rst +++ b/doc/api/matplotlib_configuration_api.rst @@ -31,6 +31,7 @@ Default values and styling :no-members: .. automethod:: find_all + .. automethod:: copy .. autofunction:: rc_context diff --git a/doc/api/next_api_changes/behavior/19214-DS.rst b/doc/api/next_api_changes/behavior/19214-DS.rst deleted file mode 100644 index cffd0b8ffd6f..000000000000 --- a/doc/api/next_api_changes/behavior/19214-DS.rst +++ /dev/null @@ -1,5 +0,0 @@ -Improved autoscaling for bezier curves --------------------------------------- -Bezier curves are now autoscaled to their extents - previously they were -autoscaled to their ends and control points, which in some cases led to -unnecessarily large limits. diff --git a/doc/api/next_api_changes/behavior/19368-DS.rst b/doc/api/next_api_changes/behavior/19368-DS.rst deleted file mode 100644 index 455eba1570f9..000000000000 --- a/doc/api/next_api_changes/behavior/19368-DS.rst +++ /dev/null @@ -1,8 +0,0 @@ -Large ``imshow`` images are now downsampled -------------------------------------------- -When showing an image using `~matplotlib.axes.Axes.imshow` that has more than -:math:`2^{24}` columns or :math:`2^{23}` rows, the image will now be downsampled -to below this resolution before being resampled for display by the AGG renderer. -Previously such a large image would be shown incorrectly. To prevent this -downsampling and the warning it raises, manually downsample your data before -handing it to `~matplotlib.axes.Axes.imshow` diff --git a/doc/api/next_api_changes/behavior/20426-JK.rst b/doc/api/next_api_changes/behavior/20426-JK.rst deleted file mode 100644 index cc849c796eac..000000000000 --- a/doc/api/next_api_changes/behavior/20426-JK.rst +++ /dev/null @@ -1,5 +0,0 @@ -Incompatible layout engines raise ---------------------------------- -``tight_layout`` and ``constrained_layout`` are incompatible if -a colorbar has been added to the figure. Invoking the incompatible layout -engine used to warn, but now raises with a ``RuntimeError``. diff --git a/doc/api/next_api_changes/behavior/20715-JKS.rst b/doc/api/next_api_changes/behavior/20715-JKS.rst deleted file mode 100644 index a91aa40ed68c..000000000000 --- a/doc/api/next_api_changes/behavior/20715-JKS.rst +++ /dev/null @@ -1,8 +0,0 @@ -``Type1Font`` objects include more properties ---------------------------------------------- - -The ``matplotlib._type1font.Type1Font.prop`` dictionary now includes more keys, -such as ``CharStrings`` and ``Subrs``. The value of the ``Encoding`` key is -now a dictionary mapping codes to glyph names. The -``matplotlib._type1font.Type1Font.transform`` method now correctly removes -``UniqueID`` properties from the font. diff --git a/doc/api/next_api_changes/behavior/21026-DS.rst b/doc/api/next_api_changes/behavior/21026-DS.rst deleted file mode 100644 index 1fdf18bd0929..000000000000 --- a/doc/api/next_api_changes/behavior/21026-DS.rst +++ /dev/null @@ -1,5 +0,0 @@ -3D contourf polygons placed between levels ------------------------------------------- -The polygons used in a 3D `~.Axes3D.contourf` plot are -now placed halfway between the contour levels, as each polygon represents the -location of values that lie between two levels. diff --git a/doc/api/next_api_changes/behavior/21042-AL.rst b/doc/api/next_api_changes/behavior/21042-AL.rst deleted file mode 100644 index 9edec6270ff0..000000000000 --- a/doc/api/next_api_changes/behavior/21042-AL.rst +++ /dev/null @@ -1,5 +0,0 @@ -rcParams.copy() returns a new RcParams instance, rather than a dict -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -This makes the copied instance still validate inputs, and additionally avoids -emitting deprecation warnings when using a previously copied RcParams instance -to update the global instance (even if some entries are deprecated). diff --git a/doc/api/next_api_changes/behavior/21238-AL.rst b/doc/api/next_api_changes/behavior/21238-AL.rst deleted file mode 100644 index 8776af61ca4d..000000000000 --- a/doc/api/next_api_changes/behavior/21238-AL.rst +++ /dev/null @@ -1,6 +0,0 @@ -``CallbackRegistry`` raises on unknown signals -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -When Matplotlib instantiates a `.CallbackRegistry`, it now limits callbacks -to the signals that the registry knows about. In practice, this means that -calling `~.FigureCanvasBase.mpl_connect` with an invalid signal name now raises -a `ValueError`. diff --git a/doc/api/next_api_changes/behavior/21983-AL.rst b/doc/api/next_api_changes/behavior/21983-AL.rst deleted file mode 100644 index d287756ec2d4..000000000000 --- a/doc/api/next_api_changes/behavior/21983-AL.rst +++ /dev/null @@ -1,8 +0,0 @@ -``FigureFrameWx`` constructor, subclasses, and ``get_canvas`` -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -The ``FigureCanvasWx`` constructor gained a *canvas_class* keyword-only -parameter which specifies the canvas class that should be used. This -parameter will become required in the future. The ``get_canvas`` method, -which was previously used to customize canvas creation, is deprecated. The -``FigureFrameWxAgg`` and ``FigureFrameWxCairo`` subclasses, which overrode -``get_canvas``, are deprecated. diff --git a/doc/api/next_api_changes/behavior/22013-AL.rst b/doc/api/next_api_changes/behavior/22013-AL.rst deleted file mode 100644 index c46b9ab7e488..000000000000 --- a/doc/api/next_api_changes/behavior/22013-AL.rst +++ /dev/null @@ -1,5 +0,0 @@ -``FigureFrameWx.sizer`` -~~~~~~~~~~~~~~~~~~~~~~~ -... has been removed. The frame layout is no longer based on a sizer, as the -canvas is now the sole child widget; the toolbar is now a regular toolbar -added using ``SetToolBar``. diff --git a/doc/api/next_api_changes/behavior/22063-SR.rst b/doc/api/next_api_changes/behavior/22063-SR.rst deleted file mode 100644 index e09bcaa70706..000000000000 --- a/doc/api/next_api_changes/behavior/22063-SR.rst +++ /dev/null @@ -1,7 +0,0 @@ -Move Axes title to not overlap with y axis offset -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -Previously, Axes titles could overlap the y-axis offset text, which is often -in the upper left corner of the axes. Now titles are moved above the offset -text if overlapping, and autopositioning is in effect (i.e. if *y* in -`.Axes.set_title` is *None* and :rc:`axes.titley` is also *None*). diff --git a/doc/api/next_api_changes/behavior/22204-AL.rst b/doc/api/next_api_changes/behavior/22204-AL.rst deleted file mode 100644 index 151ac6618bf6..000000000000 --- a/doc/api/next_api_changes/behavior/22204-AL.rst +++ /dev/null @@ -1,7 +0,0 @@ -``MathtextBackendAgg.get_results`` no longer returns ``used_characters`` -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -The last item (``used_characters``) in the tuple returned by -``MathtextBackendAgg.get_results`` has been removed. In order to unpack this -tuple in a backward and forward-compatible way, use e.g. -``ox, oy, width, height, descent, image, *_ = parse(...)``, -which will ignore ``used_characters`` if it was present. diff --git a/doc/api/next_api_changes/behavior/22229-TAC.rst b/doc/api/next_api_changes/behavior/22229-TAC.rst deleted file mode 100644 index 2f60539e16fc..000000000000 --- a/doc/api/next_api_changes/behavior/22229-TAC.rst +++ /dev/null @@ -1,18 +0,0 @@ -ArtistList proxies copy contents on iteration -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -When iterating over the contents of the dynamically generated proxy lists -for the Artist-type accessors (see :ref:`Behavioural API Changes 3.5 - Axes -children combined`), a copy of the contents is made. This ensure that artists -can safely be added or removed from the Axes while iterating over their children. - -This is a departure from the expected behavior of mutable iterable data types -in Python -- iterating over list while mutating it has surprising consequences -and dictionaries will error if they change size during iteration. -Because all of the accessors are filtered views of the same underlying list, it -is possible for seemingly unrelated changes, such as removing a Line, to affect -the iteration over any of the other accessors. In this case, we have opted to -make a copy of the relevant children before yielding them to the user. - -This change is also consistent with our plan to make these accessors immutable -in Matplotlib 3.7. diff --git a/doc/api/next_api_changes/behavior/22485-TH.rst b/doc/api/next_api_changes/behavior/22485-TH.rst deleted file mode 100644 index b2d7f61238bd..000000000000 --- a/doc/api/next_api_changes/behavior/22485-TH.rst +++ /dev/null @@ -1,5 +0,0 @@ -``AxesImage`` string representation -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -The string representation of `.AxesImage` changes from -stating the position in the figure ``"AxesImage(80,52.8;496x369.6)"`` to -giving the number of pixels ``"AxesImage(size=(300, 200))"``. diff --git a/doc/api/next_api_changes/behavior/22567-IT.rst b/doc/api/next_api_changes/behavior/22567-IT.rst deleted file mode 100644 index fcda503ffacc..000000000000 --- a/doc/api/next_api_changes/behavior/22567-IT.rst +++ /dev/null @@ -1,13 +0,0 @@ -New algorithm keyword argument to contour and contourf -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -The contouring functions `~matplotlib.axes.Axes.contour` and -`~matplotlib.axes.Axes.contourf` have a new keyword argument *algorithm* to -control which algorithm is used to calculate the contours. There is a choice -of four algorithms to use, and the default is to use ``algorithm='mpl2014'`` -which is the same algorithm that Matplotlib has been using since 2014. - -Other possible values of the *algorithm* keyword argument are ``'mpl2005'``, -``'serial'`` and ``'threaded'``; see the -`ContourPy documentation `_ for further -details. diff --git a/doc/api/next_api_changes/behavior/22639-RA.rst b/doc/api/next_api_changes/behavior/22639-RA.rst deleted file mode 100644 index c6417e1633f1..000000000000 --- a/doc/api/next_api_changes/behavior/22639-RA.rst +++ /dev/null @@ -1,5 +0,0 @@ -MacOSX backend to use sRGB instead of GenericRGB colorspace -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -MacOSX backend now display sRGB tagged image instead of GenericRGB which is -an older (now deprecated) Apple colorspace. This is the source colorspace -used by ColorSync to convert to the current display profile. diff --git a/doc/api/next_api_changes/behavior/22691-JMK.rst b/doc/api/next_api_changes/behavior/22691-JMK.rst deleted file mode 100644 index 258af259bb89..000000000000 --- a/doc/api/next_api_changes/behavior/22691-JMK.rst +++ /dev/null @@ -1,6 +0,0 @@ -QuadMesh mouseover defaults to False -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -New in 3.5, `.QuadMesh.get_cursor_data` allows display of data values -under the cursor. However, this can be very slow for large meshes, so -by `.QuadMesh.set_mouseover` defaults to *False*. diff --git a/doc/api/next_api_changes/behavior/22745-JMK.rst b/doc/api/next_api_changes/behavior/22745-JMK.rst deleted file mode 100644 index 7985d0e6a6fc..000000000000 --- a/doc/api/next_api_changes/behavior/22745-JMK.rst +++ /dev/null @@ -1,9 +0,0 @@ -No need to specify renderer for get_tightbbox and get_window_extent -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -The ``get_tightbbox`` and `~.Artist.get_window_extent` methods -no longer require the *renderer* kwarg, saving users from having to -querry it from ``fig.canvas.get_renderer``. If the *renderer* -kwarg is not supplied these methods first check if there is a cached renderer -from a previous draw and use that. If there is no cahched renderer, then -the methods will use ``fig.canvas.get_renderer()`` as a fallback. diff --git a/doc/api/next_api_changes/behavior/22950-AL.rst b/doc/api/next_api_changes/behavior/22950-AL.rst deleted file mode 100644 index bd4484936e93..000000000000 --- a/doc/api/next_api_changes/behavior/22950-AL.rst +++ /dev/null @@ -1,3 +0,0 @@ -``$\doteq \doteqdot \dotminus \dotplus \dots$`` are now surrounded by extra space -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -... because they are correctly treated as relational or binary operators. diff --git a/doc/api/next_api_changes/behavior/23031-AL.rst b/doc/api/next_api_changes/behavior/23031-AL.rst deleted file mode 100644 index bdb1554fe759..000000000000 --- a/doc/api/next_api_changes/behavior/23031-AL.rst +++ /dev/null @@ -1,5 +0,0 @@ -The encoding of style file is now specified to be utf-8 -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -It has been impossible to import Matplotlib with a non UTF-8 compatible locale -encoding because we read the style library at import time. This change is -formalizing and documenting the status quo so there is no deprecation period. diff --git a/doc/api/next_api_changes/behavior/23170-JMK.rst b/doc/api/next_api_changes/behavior/23170-JMK.rst deleted file mode 100644 index 2126d1823fdd..000000000000 --- a/doc/api/next_api_changes/behavior/23170-JMK.rst +++ /dev/null @@ -1,6 +0,0 @@ -``get_ticklabels`` now always populates labels -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -Previously `.Axis.get_ticklabels` (and `.Axes.get_xticklabels`, -`.Axes.get_yticklabels`) would only return empty strings unless a draw had -already been performed. Now the ticks and their labels are updated when the -labels are requested. diff --git a/doc/api/next_api_changes/behavior/23188-JMK.rst b/doc/api/next_api_changes/behavior/23188-JMK.rst deleted file mode 100644 index f95f6f642886..000000000000 --- a/doc/api/next_api_changes/behavior/23188-JMK.rst +++ /dev/null @@ -1,9 +0,0 @@ -Default date limits changed to 1970-01-01 to 1970-01-02 -------------------------------------------------------- - -Previously the default limits for an empty axis set up for dates -(`.Axis.axis_date`) was 2000-01-01 to 2010-01-01. This has been -changed to 1970-01-01 to 1970-01-02. With the default epoch, this -makes the numeric limit for date axes the same as for other axes -(0.0-1.0), and users are less likely to set a locator with far too -many ticks. diff --git a/doc/api/next_api_changes/behavior/23206-OG.rst b/doc/api/next_api_changes/behavior/23206-OG.rst deleted file mode 100644 index 4a91c1a943e3..000000000000 --- a/doc/api/next_api_changes/behavior/23206-OG.rst +++ /dev/null @@ -1,5 +0,0 @@ -Changed exception type for incorrect SVG date metadata -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -Providing date metadata with incorrect type to the SVG backend earlier -resulted in a ``ValueError``. Now, a ``TypeError`` is raised instead. diff --git a/doc/api/next_api_changes/behavior/23233-TH.rst b/doc/api/next_api_changes/behavior/23233-TH.rst deleted file mode 100644 index 8cf50113adf5..000000000000 --- a/doc/api/next_api_changes/behavior/23233-TH.rst +++ /dev/null @@ -1,13 +0,0 @@ -``stem(..., markerfmt=...)`` behavior -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -The behavior of the *markerfmt* parameter of `~.Axes.stem` has changed: - -- If *markerfmt* does not contain a color, the color is taken from *linefmt*. -- If *markerfmt* does not contain a marker, the default is 'o'. - -Before, *markerfmt* was passed unmodified to ``plot(..., fmt)``, which had -a number of unintended side-effects; e.g. only giving a color switched to -a solid line without markers. - -For a simple call ``stem(x, y)`` without parameters, the new rules still -reproduce the old behavior. diff --git a/doc/api/next_api_changes/behavior/23270-AL.rst b/doc/api/next_api_changes/behavior/23270-AL.rst deleted file mode 100644 index b1702a1423b6..000000000000 --- a/doc/api/next_api_changes/behavior/23270-AL.rst +++ /dev/null @@ -1,5 +0,0 @@ -The *math* parameter of ``mathtext.get_unicode_index`` is deprecated and defaults to False -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -In math mode, ASCII hyphens (U+002D) are now replaced by unicode minus signs -(U+2212) at the parsing stage. diff --git a/doc/api/next_api_changes/behavior/23299-TAC.rst b/doc/api/next_api_changes/behavior/23299-TAC.rst deleted file mode 100644 index 745bd47d6c6b..000000000000 --- a/doc/api/next_api_changes/behavior/23299-TAC.rst +++ /dev/null @@ -1,6 +0,0 @@ -mpl.rc_context no longer resets the value of ``'backend'`` -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -`matplotlib.rc_context` incorrectly reset the value of :rc:`backend` if backend -resolution was triggered in the context. This affected only the value. The actual backend -was not changed. Now, `matplotlib.rc_context` does not reset :rc:`backend` anymore. diff --git a/doc/api/next_api_changes/behavior/23371-AL.rst b/doc/api/next_api_changes/behavior/23371-AL.rst deleted file mode 100644 index 4e70f123347c..000000000000 --- a/doc/api/next_api_changes/behavior/23371-AL.rst +++ /dev/null @@ -1,4 +0,0 @@ -The default ``rcParams["animation.convert_args"]`` changed -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -It now defaults to ``["-layers", "OptimizePlus"]`` to try to generate smaller -GIFs. Set it back to an empty list to recover the previous behavior. diff --git a/doc/api/next_api_changes/behavior/23443-AL.rst b/doc/api/next_api_changes/behavior/23443-AL.rst deleted file mode 100644 index 179c36dcc261..000000000000 --- a/doc/api/next_api_changes/behavior/23443-AL.rst +++ /dev/null @@ -1,2 +0,0 @@ -The pgf backend now uses the article documentclass as basis for compilation -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/doc/api/next_api_changes/behavior/23475-WLQ.rst b/doc/api/next_api_changes/behavior/23475-WLQ.rst deleted file mode 100644 index 9f46e0ade107..000000000000 --- a/doc/api/next_api_changes/behavior/23475-WLQ.rst +++ /dev/null @@ -1,5 +0,0 @@ -The markerfacecoloralt parameter to Line2D is now supported by axes.errorbar -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -- markerfacecoloralt is now passed to the line plotter from axes.errorbar -- Documentation for axes.errorbar how accurately lists which properties are - passed on to Line2D, rather than claiming that all kwargs are passed on diff --git a/doc/api/next_api_changes/behavior/23516-MS.rst b/doc/api/next_api_changes/behavior/23516-MS.rst deleted file mode 100644 index 1d66b6d22eb8..000000000000 --- a/doc/api/next_api_changes/behavior/23516-MS.rst +++ /dev/null @@ -1,6 +0,0 @@ -Warning when scatter plot color settings discarded -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -When making an animation of a scatter plot, if you don't set *c* (the color -value parameter) when initializing the artist, the color settings are ignored. -`.Axes.scatter` now raises a warning if color-related settings are changed -without setting *c*. diff --git a/doc/api/next_api_changes/behavior/23550-OG.rst b/doc/api/next_api_changes/behavior/23550-OG.rst deleted file mode 100644 index 6f7420e431ff..000000000000 --- a/doc/api/next_api_changes/behavior/23550-OG.rst +++ /dev/null @@ -1,10 +0,0 @@ -Specified exception types in Grid -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -In a few cases an `Exception` was thrown when an incorrect argument value -was set in the `mpl_toolkits.axes_grid1.axes_grid.Grid` -(= `mpl_toolkits.axisartist.axes_grid.Grid`) constructor. These are replaced -as follows: - -* Providing an incorrect value for *ngrids* now raises a `ValueError` -* Providing an incorrect type for *rect* now raises a `TypeError` 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/prev_api_changes/api_changes_3.6.0.rst b/doc/api/prev_api_changes/api_changes_3.6.0.rst index 920c06733bce..5f2a7648a955 100644 --- a/doc/api/prev_api_changes/api_changes_3.6.0.rst +++ b/doc/api/prev_api_changes/api_changes_3.6.0.rst @@ -5,6 +5,8 @@ API Changes for 3.6.0 :local: :depth: 1 +.. include:: /api/prev_api_changes/api_changes_3.6.0/behaviour.rst + .. include:: /api/prev_api_changes/api_changes_3.6.0/removals.rst .. include:: /api/prev_api_changes/api_changes_3.6.0/development.rst diff --git a/doc/api/prev_api_changes/api_changes_3.6.0/behaviour.rst b/doc/api/prev_api_changes/api_changes_3.6.0/behaviour.rst new file mode 100644 index 000000000000..0a4a8869937c --- /dev/null +++ b/doc/api/prev_api_changes/api_changes_3.6.0/behaviour.rst @@ -0,0 +1,269 @@ +Behaviour changes +----------------- + +``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. + +Large ``imshow`` images are now downsampled +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +When showing an image using `~matplotlib.axes.Axes.imshow` that has more than +:math:`2^{24}` columns or :math:`2^{23}` rows, the image will now be +downsampled to below this resolution before being resampled for display by the +AGG renderer. Previously such a large image would be shown incorrectly. To +prevent this downsampling and the warning it raises, manually downsample your +data before handing it to `~matplotlib.axes.Axes.imshow`. + +New *algorithm* keyword argument to ``contour`` and ``contourf`` +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +The contouring functions `~matplotlib.axes.Axes.contour` and +`~matplotlib.axes.Axes.contourf` have a new keyword argument *algorithm* to +control which algorithm is used to calculate the contours. There is a choice of +four algorithms to use, and the default is to use ``algorithm='mpl2014'`` which +is the same algorithm that Matplotlib has been using since 2014. + +Other possible values of the *algorithm* keyword argument are ``'mpl2005'``, +``'serial'`` and ``'threaded'``; see the `ContourPy documentation +`_ for further details. + +Default date limits changed to 1970-01-01 – 1970-01-02 +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Previously the default limits for an empty axis set up for dates +(`.Axis.axis_date`) was 2000-01-01 to 2010-01-01. This has been changed to +1970-01-01 to 1970-01-02. With the default epoch, this makes the numeric limit +for date axes the same as for other axes (0.0-1.0), and users are less likely +to set a locator with far too many ticks. + +*markerfmt* argument to ``stem`` +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +The behavior of the *markerfmt* parameter of `~.Axes.stem` has changed: + +- If *markerfmt* does not contain a color, the color is taken from *linefmt*. +- If *markerfmt* does not contain a marker, the default is 'o'. + +Before, *markerfmt* was passed unmodified to ``plot(..., fmt)``, which had a +number of unintended side-effects; e.g. only giving a color switched to a solid +line without markers. + +For a simple call ``stem(x, y)`` without parameters, the new rules still +reproduce the old behavior. + +``get_ticklabels`` now always populates labels +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Previously `.Axis.get_ticklabels` (and `.Axes.get_xticklabels`, +`.Axes.get_yticklabels`) would only return empty strings unless a draw had +already been performed. Now the ticks and their labels are updated when the +labels are requested. + +Added *markerfacecoloralt* parameter to ``Axes.errorbar`` +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +The *markerfacecoloralt* parameter is now passed to the line plotter from +`.Axes.errorbar`. The documentation now accurately lists which properties are +passed to `.Line2D`, rather than claiming that all keyword arguments are passed +on. + +Warning when scatter plot color settings discarded +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +When making an animation of a scatter plot, if you don't set *c* (the color +value parameter) when initializing the artist, the color settings are ignored. +`.Axes.scatter` now raises a warning if color-related settings are changed +without setting *c*. + +3D ``contourf`` polygons placed between levels +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +The polygons used in a 3D `~.Axes3D.contourf` plot are now placed halfway +between the contour levels, as each polygon represents the location of values +that lie between two levels. + +Axes title now avoids y-axis offset +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Previously, Axes titles could overlap the y-axis offset text, which is often in +the upper left corner of the axes. Now titles are moved above the offset text +if overlapping when automatic title positioning is in effect (i.e. if *y* in +`.Axes.set_title` is *None* and :rc:`axes.titley` is also *None*). + +Dotted operators gain extra space in mathtext +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +In mathtext, ``\doteq \doteqdot \dotminus \dotplus \dots`` are now surrounded +by extra space because they are correctly treated as relational or binary +operators. + +*math* parameter of ``mathtext.get_unicode_index`` defaults to False +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +In math mode, ASCII hyphens (U+002D) are now replaced by Unicode minus signs +(U+2212) at the parsing stage. + +``ArtistList`` proxies copy contents on iteration +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +When iterating over the contents of the dynamically generated proxy lists for +the Artist-type accessors (see :ref:`Behavioural API Changes 3.5 - Axes +children combined`), a copy of the contents is made. This ensure that artists +can safely be added or removed from the Axes while iterating over their +children. + +This is a departure from the expected behavior of mutable iterable data types +in Python — iterating over a list while mutating it has surprising consequences +and dictionaries will error if they change size during iteration. Because all +of the accessors are filtered views of the same underlying list, it is possible +for seemingly unrelated changes, such as removing a Line, to affect the +iteration over any of the other accessors. In this case, we have opted to make +a copy of the relevant children before yielding them to the user. + +This change is also consistent with our plan to make these accessors immutable +in Matplotlib 3.7. + +``AxesImage`` string representation +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +The string representation of `.AxesImage` changes from stating the position in +the figure ``"AxesImage(80,52.8;496x369.6)"`` to giving the number of pixels +``"AxesImage(size=(300, 200))"``. + +Improved autoscaling for Bézier curves +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Bézier curves are now autoscaled to their extents - previously they were +autoscaled to their ends and control points, which in some cases led to +unnecessarily large limits. + +``QuadMesh`` mouseover defaults to False +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +New in 3.5, `.QuadMesh.get_cursor_data` allows display of data values under the +cursor. However, this can be very slow for large meshes, so mouseover now +defaults to *False*. + +Changed pgf backend document class +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +The pgf backend now uses the ``article`` document class as basis for +compilation. + +``MathtextBackendAgg.get_results`` no longer returns ``used_characters`` +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +The last item (``used_characters``) in the tuple returned by +``MathtextBackendAgg.get_results`` has been removed. In order to unpack this +tuple in a backward and forward-compatible way, use e.g. ``ox, oy, width, +height, descent, image, *_ = parse(...)``, which will ignore +``used_characters`` if it was present. + +``Type1Font`` objects include more properties +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +The ``matplotlib._type1font.Type1Font.prop`` dictionary now includes more keys, +such as ``CharStrings`` and ``Subrs``. The value of the ``Encoding`` key is now +a dictionary mapping codes to glyph names. The +``matplotlib._type1font.Type1Font.transform`` method now correctly removes +``UniqueID`` properties from the font. + +``rcParams.copy()`` returns ``RcParams`` rather than ``dict`` +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Returning an `.RcParams` instance from `.RcParams.copy` makes the copy still +validate inputs, and additionally avoids emitting deprecation warnings when +using a previously copied instance to update the global instance (even if some +entries are deprecated). + +``rc_context`` no longer resets the value of ``'backend'`` +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +`matplotlib.rc_context` incorrectly reset the value of :rc:`backend` if backend +resolution was triggered in the context. This affected only the value. The +actual backend was not changed. Now, `matplotlib.rc_context` does not reset +:rc:`backend` anymore. + +Default ``rcParams["animation.convert_args"]`` changed +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +It now defaults to ``["-layers", "OptimizePlus"]`` to try to generate smaller +GIFs. Set it back to an empty list to recover the previous behavior. + +Style file encoding now specified to be UTF-8 +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +It has been impossible to import Matplotlib with a non UTF-8 compatible locale +encoding because we read the style library at import time. This change is +formalizing and documenting the status quo so there is no deprecation period. + +MacOSX backend uses sRGB instead of GenericRGB color space +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +MacOSX backend now display sRGB tagged image instead of GenericRGB which is an +older (now deprecated) Apple color space. This is the source color space used +by ColorSync to convert to the current display profile. + +Renderer optional for ``get_tightbbox`` and ``get_window_extent`` +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +The `.Artist.get_tightbbox` and `.Artist.get_window_extent` methods no longer +require the *renderer* keyword argument, saving users from having to query it +from ``fig.canvas.get_renderer``. If the *renderer* keyword argument is not +supplied, these methods first check if there is a cached renderer from a +previous draw and use that. If there is no cached renderer, then the methods +will use ``fig.canvas.get_renderer()`` as a fallback. + +``FigureFrameWx`` constructor, subclasses, and ``get_canvas`` +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +The ``FigureCanvasWx`` constructor gained a *canvas_class* keyword-only +parameter which specifies the canvas class that should be used. This parameter +will become required in the future. The ``get_canvas`` method, which was +previously used to customize canvas creation, is deprecated. The +``FigureFrameWxAgg`` and ``FigureFrameWxCairo`` subclasses, which overrode +``get_canvas``, are deprecated. + +``FigureFrameWx.sizer`` +~~~~~~~~~~~~~~~~~~~~~~~ + +... has been removed. The frame layout is no longer based on a sizer, as the +canvas is now the sole child widget; the toolbar is now a regular toolbar added +using ``SetToolBar``. + +Incompatible layout engines raise +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +You cannot switch between ``tight_layout`` and ``constrained_layout`` if a +colorbar has already been added to a figure. Invoking the incompatible layout +engine used to warn, but now raises with a `RuntimeError`. + +``CallbackRegistry`` raises on unknown signals +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +When Matplotlib instantiates a `.CallbackRegistry`, it now limits callbacks to +the signals that the registry knows about. In practice, this means that calling +`~.FigureCanvasBase.mpl_connect` with an invalid signal name now raises a +`ValueError`. + +Changed exception type for incorrect SVG date metadata +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Providing date metadata with incorrect type to the SVG backend earlier resulted +in a `ValueError`. Now, a `TypeError` is raised instead. + +Specified exception types in ``Grid`` +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +In a few cases an `Exception` was thrown when an incorrect argument value was +set in the `mpl_toolkits.axes_grid1.axes_grid.Grid` (= +`mpl_toolkits.axisartist.axes_grid.Grid`) constructor. These are replaced as +follows: + +* Providing an incorrect value for *ngrids* now raises a `ValueError` +* Providing an incorrect type for *rect* now raises a `TypeError` diff --git a/lib/matplotlib/__init__.py b/lib/matplotlib/__init__.py index fd78e6f94f19..77d25bbe3358 100644 --- a/lib/matplotlib/__init__.py +++ b/lib/matplotlib/__init__.py @@ -720,6 +720,7 @@ def find_all(self, pattern): if pattern_re.search(key)) def copy(self): + """Copy this RcParams instance.""" rccopy = RcParams() for k in self: # Skip deprecations and revalidation. dict.__setitem__(rccopy, k, dict.__getitem__(self, k)) From 189a0552a5d3237dd21849d0d5be10dd94267d8a Mon Sep 17 00:00:00 2001 From: Elliott Sales de Andrade Date: Wed, 7 Sep 2022 01:54:03 -0400 Subject: [PATCH 4/8] Consolidate API deprecations for 3.6 --- .../deprecations/16931-AL.rst | 11 - .../deprecations/20071-AL.rst | 5 - .../deprecations/20839-EP.rst | 4 - .../deprecations/20995-AL.rst | 3 - .../deprecations/21056-AL.rst | 3 - .../deprecations/21187-AL.rst | 3 - .../deprecations/21356-AL.rst | 5 - .../deprecations/21412-AL.rst | 3 - .../deprecations/21425-AL.rst | 15 - .../deprecations/21584-AL.rst | 6 - .../deprecations/21962-AL.rst | 5 - .../deprecations/21965-AL.rst | 5 - .../deprecations/21981-AL.rst | 8 - .../deprecations/21982-AL.rst | 4 - .../deprecations/21992-AL.rst | 4 - .../deprecations/21995-AL.rst | 3 - .../deprecations/22021-AL.rst | 9 - .../deprecations/22025-AL.rst | 14 - .../deprecations/22050-AL.rst | 4 - .../deprecations/22051-AL.rst | 4 - .../deprecations/22084-SS.rst | 4 - .../deprecations/22097-AL.rst | 3 - .../deprecations/22123-TH.rst | 4 - .../deprecations/22133-OG.rst | 6 - .../deprecations/22134-OG.rst | 5 - .../deprecations/22148-OG.rst | 5 - .../deprecations/22167-EP.rst | 4 - .../deprecations/22245-AL.rst | 4 - .../deprecations/22268-OG.rst | 10 - .../deprecations/22317-AL.rst | 8 - .../deprecations/22323-GL.rst | 4 - .../deprecations/22345-JK.rst | 14 - .../deprecations/22415-AL.rst | 4 - .../deprecations/22418-AL.rst | 6 - .../deprecations/22421-AL.rst | 5 - .../deprecations/22422-AL.rst | 3 - .../deprecations/22465-AL.rst | 4 - .../deprecations/22490-AL.rst | 4 - .../deprecations/22503-AL.rst | 3 - .../deprecations/22506-AL.rst | 3 - .../deprecations/22509-AL.rst | 4 - .../deprecations/22539-AL.rst | 4 - .../deprecations/22547-AL.rst | 3 - .../deprecations/22554-AL.rst | 4 - .../deprecations/22697-OG.rst | 9 - .../deprecations/22725-AL.rst | 4 - .../deprecations/22797-OG.rst | 12 - .../deprecations/22813-GL.rst | 5 - .../deprecations/22883-AL.rst | 3 - .../deprecations/22885-AL.rst | 4 - .../deprecations/23014-OG.rst | 10 - .../deprecations/23045-OG.rst | 7 - .../deprecations/23081-OG.rst | 8 - .../deprecations/23166-ES.rst | 6 - .../deprecations/23190-OG.rst | 9 - .../deprecations/23202-GL.rst | 5 - .../deprecations/23232-TH.rst | 6 - .../deprecations/23289-AL.rst | 3 - .../deprecations/23302-TH.rst | 4 - .../deprecations/23348-AL.rst | 7 - .../deprecations/23444-AL.rst | 3 - .../deprecations/23448-AL.rst | 4 - .../deprecations/23455-OG.rst | 5 - .../deprecations/23463-OG.rst | 5 - .../deprecations/23464-AL.rst | 2 - .../deprecations/23469-AL.rst | 3 - .../deprecations/23572-AL.rst | 3 - .../deprecations/23647-OG.rst | 6 - .../deprecations/23665-GL.rst | 4 - .../deprecations/23668-TC.rst | 22 - .../deprecations/23675-OG.rst | 7 - .../deprecations/23720-RS.rst | 13 - .../deprecations/23735-ES.rst | 13 - .../deprecations/ZZZZZ-AL.rst | 4 - .../prev_api_changes/api_changes_3.6.0.rst | 2 + .../api_changes_3.6.0/deprecations.rst | 409 ++++++++++++++++++ 76 files changed, 411 insertions(+), 432 deletions(-) delete mode 100644 doc/api/next_api_changes/deprecations/16931-AL.rst delete mode 100644 doc/api/next_api_changes/deprecations/20071-AL.rst delete mode 100644 doc/api/next_api_changes/deprecations/20839-EP.rst delete mode 100644 doc/api/next_api_changes/deprecations/20995-AL.rst delete mode 100644 doc/api/next_api_changes/deprecations/21056-AL.rst delete mode 100644 doc/api/next_api_changes/deprecations/21187-AL.rst delete mode 100644 doc/api/next_api_changes/deprecations/21356-AL.rst delete mode 100644 doc/api/next_api_changes/deprecations/21412-AL.rst delete mode 100644 doc/api/next_api_changes/deprecations/21425-AL.rst delete mode 100644 doc/api/next_api_changes/deprecations/21584-AL.rst delete mode 100644 doc/api/next_api_changes/deprecations/21962-AL.rst delete mode 100644 doc/api/next_api_changes/deprecations/21965-AL.rst delete mode 100644 doc/api/next_api_changes/deprecations/21981-AL.rst delete mode 100644 doc/api/next_api_changes/deprecations/21982-AL.rst delete mode 100644 doc/api/next_api_changes/deprecations/21992-AL.rst delete mode 100644 doc/api/next_api_changes/deprecations/21995-AL.rst delete mode 100644 doc/api/next_api_changes/deprecations/22021-AL.rst delete mode 100644 doc/api/next_api_changes/deprecations/22025-AL.rst delete mode 100644 doc/api/next_api_changes/deprecations/22050-AL.rst delete mode 100644 doc/api/next_api_changes/deprecations/22051-AL.rst delete mode 100644 doc/api/next_api_changes/deprecations/22084-SS.rst delete mode 100644 doc/api/next_api_changes/deprecations/22097-AL.rst delete mode 100644 doc/api/next_api_changes/deprecations/22123-TH.rst delete mode 100644 doc/api/next_api_changes/deprecations/22133-OG.rst delete mode 100644 doc/api/next_api_changes/deprecations/22134-OG.rst delete mode 100644 doc/api/next_api_changes/deprecations/22148-OG.rst delete mode 100644 doc/api/next_api_changes/deprecations/22167-EP.rst delete mode 100644 doc/api/next_api_changes/deprecations/22245-AL.rst delete mode 100644 doc/api/next_api_changes/deprecations/22268-OG.rst delete mode 100644 doc/api/next_api_changes/deprecations/22317-AL.rst delete mode 100644 doc/api/next_api_changes/deprecations/22323-GL.rst delete mode 100644 doc/api/next_api_changes/deprecations/22345-JK.rst delete mode 100644 doc/api/next_api_changes/deprecations/22415-AL.rst delete mode 100644 doc/api/next_api_changes/deprecations/22418-AL.rst delete mode 100644 doc/api/next_api_changes/deprecations/22421-AL.rst delete mode 100644 doc/api/next_api_changes/deprecations/22422-AL.rst delete mode 100644 doc/api/next_api_changes/deprecations/22465-AL.rst delete mode 100644 doc/api/next_api_changes/deprecations/22490-AL.rst delete mode 100644 doc/api/next_api_changes/deprecations/22503-AL.rst delete mode 100644 doc/api/next_api_changes/deprecations/22506-AL.rst delete mode 100644 doc/api/next_api_changes/deprecations/22509-AL.rst delete mode 100644 doc/api/next_api_changes/deprecations/22539-AL.rst delete mode 100644 doc/api/next_api_changes/deprecations/22547-AL.rst delete mode 100644 doc/api/next_api_changes/deprecations/22554-AL.rst delete mode 100644 doc/api/next_api_changes/deprecations/22697-OG.rst delete mode 100644 doc/api/next_api_changes/deprecations/22725-AL.rst delete mode 100644 doc/api/next_api_changes/deprecations/22797-OG.rst delete mode 100644 doc/api/next_api_changes/deprecations/22813-GL.rst delete mode 100644 doc/api/next_api_changes/deprecations/22883-AL.rst delete mode 100644 doc/api/next_api_changes/deprecations/22885-AL.rst delete mode 100644 doc/api/next_api_changes/deprecations/23014-OG.rst delete mode 100644 doc/api/next_api_changes/deprecations/23045-OG.rst delete mode 100644 doc/api/next_api_changes/deprecations/23081-OG.rst delete mode 100644 doc/api/next_api_changes/deprecations/23166-ES.rst delete mode 100644 doc/api/next_api_changes/deprecations/23190-OG.rst delete mode 100644 doc/api/next_api_changes/deprecations/23202-GL.rst delete mode 100644 doc/api/next_api_changes/deprecations/23232-TH.rst delete mode 100644 doc/api/next_api_changes/deprecations/23289-AL.rst delete mode 100644 doc/api/next_api_changes/deprecations/23302-TH.rst delete mode 100644 doc/api/next_api_changes/deprecations/23348-AL.rst delete mode 100644 doc/api/next_api_changes/deprecations/23444-AL.rst delete mode 100644 doc/api/next_api_changes/deprecations/23448-AL.rst delete mode 100644 doc/api/next_api_changes/deprecations/23455-OG.rst delete mode 100644 doc/api/next_api_changes/deprecations/23463-OG.rst delete mode 100644 doc/api/next_api_changes/deprecations/23464-AL.rst delete mode 100644 doc/api/next_api_changes/deprecations/23469-AL.rst delete mode 100644 doc/api/next_api_changes/deprecations/23572-AL.rst delete mode 100644 doc/api/next_api_changes/deprecations/23647-OG.rst delete mode 100644 doc/api/next_api_changes/deprecations/23665-GL.rst delete mode 100644 doc/api/next_api_changes/deprecations/23668-TC.rst delete mode 100644 doc/api/next_api_changes/deprecations/23675-OG.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/ZZZZZ-AL.rst create mode 100644 doc/api/prev_api_changes/api_changes_3.6.0/deprecations.rst diff --git a/doc/api/next_api_changes/deprecations/16931-AL.rst b/doc/api/next_api_changes/deprecations/16931-AL.rst deleted file mode 100644 index 3dfa7d2cbaf7..000000000000 --- a/doc/api/next_api_changes/deprecations/16931-AL.rst +++ /dev/null @@ -1,11 +0,0 @@ -Event handlers -~~~~~~~~~~~~~~ -The ``draw_event``, ``resize_event``, ``close_event``, ``key_press_event``, -``key_release_event``, ``pick_event``, ``scroll_event``, -``button_press_event``, ``button_release_event``, ``motion_notify_event``, -``enter_notify_event`` and ``leave_notify_event`` methods of `.FigureCanvasBase` -are deprecated. They had inconsistent signatures across backends, and made it -difficult to improve event metadata. - -In order to trigger an event on a canvas, directly construct an `.Event` object -of the correct class and call ``canvas.callbacks.process(event.name, event)``. diff --git a/doc/api/next_api_changes/deprecations/20071-AL.rst b/doc/api/next_api_changes/deprecations/20071-AL.rst deleted file mode 100644 index cf07224581ad..000000000000 --- a/doc/api/next_api_changes/deprecations/20071-AL.rst +++ /dev/null @@ -1,5 +0,0 @@ -``axes_size`` internal helpers -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -The following APIs are deprecated: ``axes_size.Padded`` (use ``size + pad`` -instead), ``axes_size.SizeFromFunc``, ``axes_size.GetExtentHelper``. diff --git a/doc/api/next_api_changes/deprecations/20839-EP.rst b/doc/api/next_api_changes/deprecations/20839-EP.rst deleted file mode 100644 index 1388abca194f..000000000000 --- a/doc/api/next_api_changes/deprecations/20839-EP.rst +++ /dev/null @@ -1,4 +0,0 @@ -Selector widget state internals -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -The *state_modifier_keys* attribute have been privatized and the modifier keys -needs to be set when creating the widget. diff --git a/doc/api/next_api_changes/deprecations/20995-AL.rst b/doc/api/next_api_changes/deprecations/20995-AL.rst deleted file mode 100644 index bdccd8f5d333..000000000000 --- a/doc/api/next_api_changes/deprecations/20995-AL.rst +++ /dev/null @@ -1,3 +0,0 @@ -``backend_gtk3.icon_filename`` and ``backend_gtk3.window_icon`` -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -... are deprecated with no replacement. diff --git a/doc/api/next_api_changes/deprecations/21056-AL.rst b/doc/api/next_api_changes/deprecations/21056-AL.rst deleted file mode 100644 index c97a7f2dfde6..000000000000 --- a/doc/api/next_api_changes/deprecations/21056-AL.rst +++ /dev/null @@ -1,3 +0,0 @@ -Calling ``MarkerStyle()`` with no arguments or ``MarkerStyle(None)`` -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -... is deprecated; use ``MarkerStyle("")`` to construct an empty marker style. diff --git a/doc/api/next_api_changes/deprecations/21187-AL.rst b/doc/api/next_api_changes/deprecations/21187-AL.rst deleted file mode 100644 index 8f4e1be05a8b..000000000000 --- a/doc/api/next_api_changes/deprecations/21187-AL.rst +++ /dev/null @@ -1,3 +0,0 @@ -``backend_gtk3.error_msg_gtk`` and ``backend_wx.error_msg_wx`` -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -... are deprecated. diff --git a/doc/api/next_api_changes/deprecations/21356-AL.rst b/doc/api/next_api_changes/deprecations/21356-AL.rst deleted file mode 100644 index de6cb79dd908..000000000000 --- a/doc/api/next_api_changes/deprecations/21356-AL.rst +++ /dev/null @@ -1,5 +0,0 @@ -In the future, ``dviread.find_tex_file`` will raise a ``FileNotFoundError`` for missing files -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -Previously, it would return an empty string in such cases. Raising an -exception allows attaching a user-friendly message instead. During the -transition period, a warning is raised. diff --git a/doc/api/next_api_changes/deprecations/21412-AL.rst b/doc/api/next_api_changes/deprecations/21412-AL.rst deleted file mode 100644 index e101620739d9..000000000000 --- a/doc/api/next_api_changes/deprecations/21412-AL.rst +++ /dev/null @@ -1,3 +0,0 @@ -``backend_svg.generate_transform`` and ``backend_svg.generate_css`` -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -... are deprecated with no replacement. diff --git a/doc/api/next_api_changes/deprecations/21425-AL.rst b/doc/api/next_api_changes/deprecations/21425-AL.rst deleted file mode 100644 index d6652bfbac57..000000000000 --- a/doc/api/next_api_changes/deprecations/21425-AL.rst +++ /dev/null @@ -1,15 +0,0 @@ -3D Axis -~~~~~~~ -The previous constructor of `.axis3d.Axis`, with signature -``(self, adir, v_intervalx, d_intervalx, axes, *args, rotate_label=None, **kwargs)`` -is deprecated in favor of a new signature closer to the one of 2D Axis; it -is now ``(self, axes, *, rotate_label=None, **kwargs)`` where ``kwargs`` are -forwarded to the 2D Axis constructor. The axis direction is now inferred from -the axis class' ``axis_name`` attribute (as in the 2D case); the ``adir`` -attribute is deprecated. - -The ``init3d`` method of 3D Axis is also deprecated; all the relevant -initialization is done as part of the constructor. - -The ``d_interval`` and ``v_interval`` attributes of 3D Axis are deprecated; use -``get_data_interval`` and ``get_view_interval`` instead. diff --git a/doc/api/next_api_changes/deprecations/21584-AL.rst b/doc/api/next_api_changes/deprecations/21584-AL.rst deleted file mode 100644 index c6f47530cddb..000000000000 --- a/doc/api/next_api_changes/deprecations/21584-AL.rst +++ /dev/null @@ -1,6 +0,0 @@ -Modifications to the Groupers returned by ``get_shared_x_axes`` and ``get_shared_y_axes`` -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -... are deprecated. In the future, these methods will return immutable views -on the grouper structures. Note that previously, calling e.g. ``join()`` -would already fail to set up the correct structures for sharing axes; use -`.Axes.sharex` or `.Axes.sharey` instead. diff --git a/doc/api/next_api_changes/deprecations/21962-AL.rst b/doc/api/next_api_changes/deprecations/21962-AL.rst deleted file mode 100644 index e5ddab747b48..000000000000 --- a/doc/api/next_api_changes/deprecations/21962-AL.rst +++ /dev/null @@ -1,5 +0,0 @@ -``backend_pgf`` -~~~~~~~~~~~~~~~ -The following API elements have been deprecated with no -replacement: ``NO_ESCAPE``, ``re_mathsep``, ``get_fontspec``, ``get_preamble``, -``common_texification``, ``writeln``. diff --git a/doc/api/next_api_changes/deprecations/21965-AL.rst b/doc/api/next_api_changes/deprecations/21965-AL.rst deleted file mode 100644 index 6ba7bf3cc852..000000000000 --- a/doc/api/next_api_changes/deprecations/21965-AL.rst +++ /dev/null @@ -1,5 +0,0 @@ -``transOffset`` parameter name -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -The ``transOffset`` parameter of `.Collection.set_offset_transform` and the -various ``create_collection`` methods of legend handlers has been renamed to -``offset_transform`` (consistently with the property name). diff --git a/doc/api/next_api_changes/deprecations/21981-AL.rst b/doc/api/next_api_changes/deprecations/21981-AL.rst deleted file mode 100644 index 5641f09e4991..000000000000 --- a/doc/api/next_api_changes/deprecations/21981-AL.rst +++ /dev/null @@ -1,8 +0,0 @@ -``RendererGTK3Cairo`` and ``RendererGTK4Cairo`` -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -... have been deprecated. Use ``RendererCairo`` instead, which has gained -the ``set_context`` method, which also auto-infers the size of the underlying -surface. - -``RendererCairo.set_ctx_from_surface`` and ``RendererCairo.set_width_height`` -have likewise been deprecated, in favor of ``set_context``. diff --git a/doc/api/next_api_changes/deprecations/21982-AL.rst b/doc/api/next_api_changes/deprecations/21982-AL.rst deleted file mode 100644 index 38f37db510a7..000000000000 --- a/doc/api/next_api_changes/deprecations/21982-AL.rst +++ /dev/null @@ -1,4 +0,0 @@ -``FigureManagerGTK3Agg`` and ``FigureManagerGTK4Agg`` -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -... are deprecated; directly use ``FigureManagerGTK3`` and -``FigureManagerGTK4`` instead. diff --git a/doc/api/next_api_changes/deprecations/21992-AL.rst b/doc/api/next_api_changes/deprecations/21992-AL.rst deleted file mode 100644 index e3bdaba31267..000000000000 --- a/doc/api/next_api_changes/deprecations/21992-AL.rst +++ /dev/null @@ -1,4 +0,0 @@ -``lastrect`` -~~~~~~~~~~~~ -The ``lastrect`` attribute of ``NavigationToolbar2Tk`` and ``RubberbandTk`` is -deprecated. diff --git a/doc/api/next_api_changes/deprecations/21995-AL.rst b/doc/api/next_api_changes/deprecations/21995-AL.rst deleted file mode 100644 index e9b7dab027f0..000000000000 --- a/doc/api/next_api_changes/deprecations/21995-AL.rst +++ /dev/null @@ -1,3 +0,0 @@ -``ImageMagickBase.delay`` and ``ImageMagickBase.output_args`` -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -are deprecated with no replacement. diff --git a/doc/api/next_api_changes/deprecations/22021-AL.rst b/doc/api/next_api_changes/deprecations/22021-AL.rst deleted file mode 100644 index 24b565409b97..000000000000 --- a/doc/api/next_api_changes/deprecations/22021-AL.rst +++ /dev/null @@ -1,9 +0,0 @@ -``NavigationToolbar2GTK3`` window -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -The *window* parameter to ``NavigationToolbar2GTK3`` had no effect, and is now -deprecated; likewise, the ``win`` attribute is deprecated. - -``NavigationToolbar2Tk`` window -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -The *window* attribute to ``NavigationToolbar2GTK3`` is deprecated. Use -``toolbar.master`` instead. diff --git a/doc/api/next_api_changes/deprecations/22025-AL.rst b/doc/api/next_api_changes/deprecations/22025-AL.rst deleted file mode 100644 index 52a4fc04707a..000000000000 --- a/doc/api/next_api_changes/deprecations/22025-AL.rst +++ /dev/null @@ -1,14 +0,0 @@ -``FigureFrameWx`` attributes and methods -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -- ``sizer`` is deprecated (use ``frame.GetSizer()`` instead). -- ``figmgr`` and ``get_figure_manager`` are deprecated (use - ``frame.canvas.manager`` instead). -- ``num`` is deprecated (use ``frame.canvas.manager.num`` instead). -- ``toolbar`` is deprecated (use ``frame.GetToolBar()`` - instead). -- ``toolmanager`` is deprecated (use ``frame.canvas.manager.toolmanager`` - instead). - -``RendererWx.offset_text_height`` -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -... is deprecated. diff --git a/doc/api/next_api_changes/deprecations/22050-AL.rst b/doc/api/next_api_changes/deprecations/22050-AL.rst deleted file mode 100644 index df32560157c3..000000000000 --- a/doc/api/next_api_changes/deprecations/22050-AL.rst +++ /dev/null @@ -1,4 +0,0 @@ -``FigureCanvasBase.resize`` -~~~~~~~~~~~~~~~~~~~~~~~~~~~ -This method has no effect and is deprecated. Use ``FigureManagerBase.resize`` -instead. diff --git a/doc/api/next_api_changes/deprecations/22051-AL.rst b/doc/api/next_api_changes/deprecations/22051-AL.rst deleted file mode 100644 index 468cdd39ae53..000000000000 --- a/doc/api/next_api_changes/deprecations/22051-AL.rst +++ /dev/null @@ -1,4 +0,0 @@ -``FigureCanvas`` without a ``required_interactive_framework`` attribute -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -Support for such canvas classes is deprecated. Note that canvas classes which -inherit from ``FigureCanvasBase`` always have such an attribute. diff --git a/doc/api/next_api_changes/deprecations/22084-SS.rst b/doc/api/next_api_changes/deprecations/22084-SS.rst deleted file mode 100644 index ff835dce710c..000000000000 --- a/doc/api/next_api_changes/deprecations/22084-SS.rst +++ /dev/null @@ -1,4 +0,0 @@ -``Axes3D.dist`` -~~~~~~~~~~~~~~~ -... has been privatized. Use the ``zoom`` keyword argument in -`.Axes3D.set_box_aspect` instead. diff --git a/doc/api/next_api_changes/deprecations/22097-AL.rst b/doc/api/next_api_changes/deprecations/22097-AL.rst deleted file mode 100644 index 0af7e16264c8..000000000000 --- a/doc/api/next_api_changes/deprecations/22097-AL.rst +++ /dev/null @@ -1,3 +0,0 @@ -``AxisArtistHelper.delta1`` and ``AxisArtistHelper.delta2`` -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -... are deprecated with no replacement. diff --git a/doc/api/next_api_changes/deprecations/22123-TH.rst b/doc/api/next_api_changes/deprecations/22123-TH.rst deleted file mode 100644 index 5b65ac760bd6..000000000000 --- a/doc/api/next_api_changes/deprecations/22123-TH.rst +++ /dev/null @@ -1,4 +0,0 @@ -``Axes.get_window_extent`` and ``Figure.get_window_extent`` won't accept parameters other than *renderer* anymore -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -This aligns the API with the general `.Artist.get_window_extent` API. -All parameters were ignored anyway. diff --git a/doc/api/next_api_changes/deprecations/22133-OG.rst b/doc/api/next_api_changes/deprecations/22133-OG.rst deleted file mode 100644 index 7a551d25ce0a..000000000000 --- a/doc/api/next_api_changes/deprecations/22133-OG.rst +++ /dev/null @@ -1,6 +0,0 @@ -``AFM``, ``configfont_pattern`` and ``Type1Font`` deprecated ------------------------------------------------------------- - -The modules ``matplotlib.AFM``, ``matplotlib.configfont_pattern``, and -``matplotlib.Type1Font`` are considered internal and public access is -deprecated. diff --git a/doc/api/next_api_changes/deprecations/22134-OG.rst b/doc/api/next_api_changes/deprecations/22134-OG.rst deleted file mode 100644 index fc68b4b7b473..000000000000 --- a/doc/api/next_api_changes/deprecations/22134-OG.rst +++ /dev/null @@ -1,5 +0,0 @@ -Modules ``tight_bbox`` and ``tight_layout`` deprecated ------------------------------------------------------- - -The modules ``matplotlib.tight_bbox`` and ``matplotlib.tight_layout`` are -considered internal and public access is deprecated. diff --git a/doc/api/next_api_changes/deprecations/22148-OG.rst b/doc/api/next_api_changes/deprecations/22148-OG.rst deleted file mode 100644 index 70a59ba39042..000000000000 --- a/doc/api/next_api_changes/deprecations/22148-OG.rst +++ /dev/null @@ -1,5 +0,0 @@ -Module ``docstring`` deprecated -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -The module ``matplotlib.docstring`` is considered internal and public access -is deprecated. diff --git a/doc/api/next_api_changes/deprecations/22167-EP.rst b/doc/api/next_api_changes/deprecations/22167-EP.rst deleted file mode 100644 index 5cc1c9991e01..000000000000 --- a/doc/api/next_api_changes/deprecations/22167-EP.rst +++ /dev/null @@ -1,4 +0,0 @@ -Selector widget state internals -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -The *visible* attribute has been deprecated, use *set_visible* or -*get_visible* instead. diff --git a/doc/api/next_api_changes/deprecations/22245-AL.rst b/doc/api/next_api_changes/deprecations/22245-AL.rst deleted file mode 100644 index e49a44e69b4b..000000000000 --- a/doc/api/next_api_changes/deprecations/22245-AL.rst +++ /dev/null @@ -1,4 +0,0 @@ -*cleared* parameter of ``get_renderer`` -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -This parameter, which only existed for agg-based backends, has been deprecated. -Use ``renderer.clear()`` instead to explicitly clear the renderer buffer. diff --git a/doc/api/next_api_changes/deprecations/22268-OG.rst b/doc/api/next_api_changes/deprecations/22268-OG.rst deleted file mode 100644 index 79efe3783cea..000000000000 --- a/doc/api/next_api_changes/deprecations/22268-OG.rst +++ /dev/null @@ -1,10 +0,0 @@ -``ticker`` functions deprecated -------------------------------- - -The functions ``matplotlib.ticker.is_decade`` and -``matplotlib.ticker.is_close_to_int`` are considered internal and public access -is deprecated. - -For ``is_close_to_int`` use ``math.isclose(x, round(x))`` instead. -For ``is_decade`` use -``y = numpy.log(x)/numpy.log(base); numpy.isclose(y, numpy.round(y))`` diff --git a/doc/api/next_api_changes/deprecations/22317-AL.rst b/doc/api/next_api_changes/deprecations/22317-AL.rst deleted file mode 100644 index 0b6093a993ce..000000000000 --- a/doc/api/next_api_changes/deprecations/22317-AL.rst +++ /dev/null @@ -1,8 +0,0 @@ -seaborn styles renamed -~~~~~~~~~~~~~~~~~~~~~~ -Matplotlib currently ships many style files inspired from the seaborn -library ("seaborn", "seaborn-bright", "seaborn-colorblind", etc.) but they -have gone out of sync with the library itself since the release of seaborn -0.9. To prevent confusion, the style files have been renamed "seaborn-v0_8", -"seaborn-v0_8-bright", "seaborn-v0_8-colorblind", etc. Users are encouraged to -directly use seaborn to access the up-to-date styles. diff --git a/doc/api/next_api_changes/deprecations/22323-GL.rst b/doc/api/next_api_changes/deprecations/22323-GL.rst deleted file mode 100644 index b755c7804731..000000000000 --- a/doc/api/next_api_changes/deprecations/22323-GL.rst +++ /dev/null @@ -1,4 +0,0 @@ -``matplotlib.cbook.maxdict`` is deprecated -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -This class has been deprecated in favor of the standard library -``functools.lru_cache``. diff --git a/doc/api/next_api_changes/deprecations/22345-JK.rst b/doc/api/next_api_changes/deprecations/22345-JK.rst deleted file mode 100644 index 003952fd705f..000000000000 --- a/doc/api/next_api_changes/deprecations/22345-JK.rst +++ /dev/null @@ -1,14 +0,0 @@ -Pending deprecation of layout methods -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -The methods `~.Figure.set_tight_layout`, `~.Figure.set_constrained_layout`, -are discouraged, and now emit a ``PendingDeprecationWarning`` in favor of -explicitly referencing the layout engine via -``figure.set_layout_engine('tight')`` and -``figure.set_layout_engine('constrained')``. End users should not see the -warning, but library authors should adjust. - -The methods `~.Figure.set_constrained_layout_pads` and -`~.Figure.get_constrained_layout_pads` are will be deprecated in favor of -``figure.get_layout_engine().set()`` and -``figure.get_layout_engine().get()``, and currently emit a -``PendingDeprecationWarning``. diff --git a/doc/api/next_api_changes/deprecations/22415-AL.rst b/doc/api/next_api_changes/deprecations/22415-AL.rst deleted file mode 100644 index 4991834136ef..000000000000 --- a/doc/api/next_api_changes/deprecations/22415-AL.rst +++ /dev/null @@ -1,4 +0,0 @@ -*emit* and *auto* parameters of ``set_xlim``, ``set_ylim``, ``set_zlim``, ``set_rlim`` -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -Passing these parameters positionally is deprecated; they will become -keyword-only in a future release. diff --git a/doc/api/next_api_changes/deprecations/22418-AL.rst b/doc/api/next_api_changes/deprecations/22418-AL.rst deleted file mode 100644 index 8e7fb763223b..000000000000 --- a/doc/api/next_api_changes/deprecations/22418-AL.rst +++ /dev/null @@ -1,6 +0,0 @@ -Auto-removal of overlapping Axes by ``plt.subplot`` and ``plt.subplot2grid`` -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -Previously, `.pyplot.subplot` and `.pyplot.subplot2grid` would automatically -remove preexisting Axes that overlap with the newly added Axes. This behavior -was deemed confusing, and is now deprecated. Explicitly call ``ax.remove()`` -on Axes that need to be removed. diff --git a/doc/api/next_api_changes/deprecations/22421-AL.rst b/doc/api/next_api_changes/deprecations/22421-AL.rst deleted file mode 100644 index 36b92d233d12..000000000000 --- a/doc/api/next_api_changes/deprecations/22421-AL.rst +++ /dev/null @@ -1,5 +0,0 @@ -Parameters to ``plt.figure()`` and the ``Figure`` constructor -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -All parameters to `.pyplot.figure` and the `.Figure` constructor, other than -*num*, *figsize*, and *dpi*, will become keyword-only after a deprecation -period. diff --git a/doc/api/next_api_changes/deprecations/22422-AL.rst b/doc/api/next_api_changes/deprecations/22422-AL.rst deleted file mode 100644 index 174e4e50f1d3..000000000000 --- a/doc/api/next_api_changes/deprecations/22422-AL.rst +++ /dev/null @@ -1,3 +0,0 @@ -``backend_ps.convert_psfrags`` -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -... is deprecated. diff --git a/doc/api/next_api_changes/deprecations/22465-AL.rst b/doc/api/next_api_changes/deprecations/22465-AL.rst deleted file mode 100644 index 95e3319cf149..000000000000 --- a/doc/api/next_api_changes/deprecations/22465-AL.rst +++ /dev/null @@ -1,4 +0,0 @@ -``mpl_toolkits.axes_grid1.axes_size.AddList`` -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -... is deprecated due to being unused. Use ``sum(sizes, start=Fixed(0))`` (for -example) to sum multiple size objects. diff --git a/doc/api/next_api_changes/deprecations/22490-AL.rst b/doc/api/next_api_changes/deprecations/22490-AL.rst deleted file mode 100644 index 735a1ca350c3..000000000000 --- a/doc/api/next_api_changes/deprecations/22490-AL.rst +++ /dev/null @@ -1,4 +0,0 @@ -``Affine2D.identity()`` -~~~~~~~~~~~~~~~~~~~~~~~ -... is deprecated in favor of directly calling the `.Affine2D` constructor with -no arguments. diff --git a/doc/api/next_api_changes/deprecations/22503-AL.rst b/doc/api/next_api_changes/deprecations/22503-AL.rst deleted file mode 100644 index fb5990e5c4f0..000000000000 --- a/doc/api/next_api_changes/deprecations/22503-AL.rst +++ /dev/null @@ -1,3 +0,0 @@ -``backend_qt.qApp`` -~~~~~~~~~~~~~~~~~~~ -... is deprecated. Use ``QtWidgets.QApplication.instance()`` instead. diff --git a/doc/api/next_api_changes/deprecations/22506-AL.rst b/doc/api/next_api_changes/deprecations/22506-AL.rst deleted file mode 100644 index fe3611563c63..000000000000 --- a/doc/api/next_api_changes/deprecations/22506-AL.rst +++ /dev/null @@ -1,3 +0,0 @@ -``MathtextBackend``, ``MathtextBackendAgg``, ``MathtextBackendPath``, ``MathTextWarning`` -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -... are deprecated with no replacement. diff --git a/doc/api/next_api_changes/deprecations/22509-AL.rst b/doc/api/next_api_changes/deprecations/22509-AL.rst deleted file mode 100644 index 01191b500757..000000000000 --- a/doc/api/next_api_changes/deprecations/22509-AL.rst +++ /dev/null @@ -1,4 +0,0 @@ -``ToolBase.destroy`` -~~~~~~~~~~~~~~~~~~~~ -... is deprecated. To run code upon tool removal, connect to the -``tool_removed_event`` event. diff --git a/doc/api/next_api_changes/deprecations/22539-AL.rst b/doc/api/next_api_changes/deprecations/22539-AL.rst deleted file mode 100644 index 51e2d2a77de4..000000000000 --- a/doc/api/next_api_changes/deprecations/22539-AL.rst +++ /dev/null @@ -1,4 +0,0 @@ -``matplotlib.text.get_rotation()`` -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -... is deprecated with no replacement. Copy the original implementation if -needed. diff --git a/doc/api/next_api_changes/deprecations/22547-AL.rst b/doc/api/next_api_changes/deprecations/22547-AL.rst deleted file mode 100644 index 274d3fa3f014..000000000000 --- a/doc/api/next_api_changes/deprecations/22547-AL.rst +++ /dev/null @@ -1,3 +0,0 @@ -``TextToPath.get_texmanager`` -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -... is deprecated; directly construct a `.texmanager.TexManager` instead. diff --git a/doc/api/next_api_changes/deprecations/22554-AL.rst b/doc/api/next_api_changes/deprecations/22554-AL.rst deleted file mode 100644 index f7c461c2bbf0..000000000000 --- a/doc/api/next_api_changes/deprecations/22554-AL.rst +++ /dev/null @@ -1,4 +0,0 @@ -``_DummyAxis.dataLim`` and ``_DummyAxis.viewLim`` -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -... are deprecated. Use ``get_data_interval()``, ``set_data_interval()``, -``get_view_interval()``, and ``set_view_interval()`` instead. diff --git a/doc/api/next_api_changes/deprecations/22697-OG.rst b/doc/api/next_api_changes/deprecations/22697-OG.rst deleted file mode 100644 index d3ac3d85f0fc..000000000000 --- a/doc/api/next_api_changes/deprecations/22697-OG.rst +++ /dev/null @@ -1,9 +0,0 @@ -Deprecations in ``testing.decorators`` -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -The unused class ``CleanupTestCase`` and decorator ``cleanup`` are deprecated -and will be removed. Vendor the code, including the private function -``_cleanup_cm``. - -The function ``check_freetype_version`` is considered internal and deprecated. -Vendor the code of the private function ``_check_freetype_version``. diff --git a/doc/api/next_api_changes/deprecations/22725-AL.rst b/doc/api/next_api_changes/deprecations/22725-AL.rst deleted file mode 100644 index 4ca25374c2e4..000000000000 --- a/doc/api/next_api_changes/deprecations/22725-AL.rst +++ /dev/null @@ -1,4 +0,0 @@ -``TexManager.get_font_config`` -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -... is deprecated with no replacement. (It previously returned an internal -hashed key for used for caching purposes.) diff --git a/doc/api/next_api_changes/deprecations/22797-OG.rst b/doc/api/next_api_changes/deprecations/22797-OG.rst deleted file mode 100644 index c263a3969d4b..000000000000 --- a/doc/api/next_api_changes/deprecations/22797-OG.rst +++ /dev/null @@ -1,12 +0,0 @@ -Deprecation of helper functions in backends -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -The following functions are considered private and deprecated. Vendor the code -of the similarly named private functions if you rely on these functions. - -* ``backend_pdf.fill`` -* ``backend_ps.quote_ps_string`` -* ``backend_svg.escape_attrib`` -* ``backend_svg.escape_cdata`` -* ``backend_svg.escape_comment`` -* ``backend_svg.short_float_fmt`` diff --git a/doc/api/next_api_changes/deprecations/22813-GL.rst b/doc/api/next_api_changes/deprecations/22813-GL.rst deleted file mode 100644 index 476ee7975e17..000000000000 --- a/doc/api/next_api_changes/deprecations/22813-GL.rst +++ /dev/null @@ -1,5 +0,0 @@ -``figure.callbacks`` is deprecated -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -The figure callbacks property is deprecated. The only signal was -"dpi_changed", which can be replaced by connecting to the "resize_event" -on the canvas ``figure.canvas.mpl_connect("resize_event", func)`` instead. diff --git a/doc/api/next_api_changes/deprecations/22883-AL.rst b/doc/api/next_api_changes/deprecations/22883-AL.rst deleted file mode 100644 index 916658e6f1e2..000000000000 --- a/doc/api/next_api_changes/deprecations/22883-AL.rst +++ /dev/null @@ -1,3 +0,0 @@ -Passing too many positional arguments to ``tripcolor`` -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -... is now deprecated (extra arguments were previously silently ignored). diff --git a/doc/api/next_api_changes/deprecations/22885-AL.rst b/doc/api/next_api_changes/deprecations/22885-AL.rst deleted file mode 100644 index 3eb235cb7c8c..000000000000 --- a/doc/api/next_api_changes/deprecations/22885-AL.rst +++ /dev/null @@ -1,4 +0,0 @@ -``backend_pdf.Operator`` and ``backend_pdf.Op.op`` -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -... are deprecated in favor of a single standard `enum.Enum` interface on -`.backend_pdf.Op`. diff --git a/doc/api/next_api_changes/deprecations/23014-OG.rst b/doc/api/next_api_changes/deprecations/23014-OG.rst deleted file mode 100644 index b7d995e22802..000000000000 --- a/doc/api/next_api_changes/deprecations/23014-OG.rst +++ /dev/null @@ -1,10 +0,0 @@ -Methods to set parameters in ``LogLocator`` and ``LogFormatter*`` -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -In `~.LogFormatter` and derived subclasses, the methods ``base`` and -``label_minor`` for setting the respective parameter are deprecated and -replaced by ``set_base`` and ``set_label_minor``, respectively. - -In `~.LogLocator`, the methods ``base`` and ``subs`` for setting the -respective parameter are deprecated. Instead, use -``set_params(base=..., subs=...)``. diff --git a/doc/api/next_api_changes/deprecations/23045-OG.rst b/doc/api/next_api_changes/deprecations/23045-OG.rst deleted file mode 100644 index e10c410999ad..000000000000 --- a/doc/api/next_api_changes/deprecations/23045-OG.rst +++ /dev/null @@ -1,7 +0,0 @@ -``checkdep_usetex`` deprecated -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -This method was only intended to disable tests in case no latex install was -found. As such, it is considered to be private and for internal use only. - -Please vendor the code if you need this. diff --git a/doc/api/next_api_changes/deprecations/23081-OG.rst b/doc/api/next_api_changes/deprecations/23081-OG.rst deleted file mode 100644 index da7f697023c0..000000000000 --- a/doc/api/next_api_changes/deprecations/23081-OG.rst +++ /dev/null @@ -1,8 +0,0 @@ -``date_ticker_factory`` deprecated -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -The ``date_ticker_factory`` method in the `matplotlib.dates` module is -deprecated. Instead use `~.AutoDateLocator` and `~.AutoDateFormatter` for a -more flexible and scalable locator and formatter. - -If you need the exact ``date_ticker_factory`` behavior, please copy the code. diff --git a/doc/api/next_api_changes/deprecations/23166-ES.rst b/doc/api/next_api_changes/deprecations/23166-ES.rst deleted file mode 100644 index 34392973306f..000000000000 --- a/doc/api/next_api_changes/deprecations/23166-ES.rst +++ /dev/null @@ -1,6 +0,0 @@ -Positional arguments in Artist constructors -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -Passing all but the very few first arguments positionally in the constructors -of Artists is deprecated. Most arguments will become keyword-only in a future -version. diff --git a/doc/api/next_api_changes/deprecations/23190-OG.rst b/doc/api/next_api_changes/deprecations/23190-OG.rst deleted file mode 100644 index 0fe0624a2382..000000000000 --- a/doc/api/next_api_changes/deprecations/23190-OG.rst +++ /dev/null @@ -1,9 +0,0 @@ -Unused methods in ``Axis``, ``Tick``, ``XAxis``, and ``YAxis`` -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -The following methods are no longer used and deprecated without a replacement:: - - - ``Axis.get_ticklabel_extents`` - - ``Tick.get_pad_pixels`` - - ``XAxis.get_text_heights`` - - ``YAxis.get_text_widths`` diff --git a/doc/api/next_api_changes/deprecations/23202-GL.rst b/doc/api/next_api_changes/deprecations/23202-GL.rst deleted file mode 100644 index c4e7a6538a7c..000000000000 --- a/doc/api/next_api_changes/deprecations/23202-GL.rst +++ /dev/null @@ -1,5 +0,0 @@ -``Axes.get_renderer_cache`` -~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -The canvas now takes care of the renderer and whether to cache it -or not. The alternative is to call ``axes.figure.canvas.get_renderer()``. diff --git a/doc/api/next_api_changes/deprecations/23232-TH.rst b/doc/api/next_api_changes/deprecations/23232-TH.rst deleted file mode 100644 index c4df9f3bc666..000000000000 --- a/doc/api/next_api_changes/deprecations/23232-TH.rst +++ /dev/null @@ -1,6 +0,0 @@ -Passing *linefmt* positionally is undeprecated -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -Positional use of all formatting parameters in `~.Axes.stem` has been -deprecated since Matplotlib 3.5. This deprecation is relaxed so that one can -still pass *linefmt* positionally, i.e. ``stem(x, y, 'r')``. diff --git a/doc/api/next_api_changes/deprecations/23289-AL.rst b/doc/api/next_api_changes/deprecations/23289-AL.rst deleted file mode 100644 index 85ce88e6fe1c..000000000000 --- a/doc/api/next_api_changes/deprecations/23289-AL.rst +++ /dev/null @@ -1,3 +0,0 @@ -``backend_pdf.Name.hexify`` -~~~~~~~~~~~~~~~~~~~~~~~~~~~ -... is deprecated with no replacement. diff --git a/doc/api/next_api_changes/deprecations/23302-TH.rst b/doc/api/next_api_changes/deprecations/23302-TH.rst deleted file mode 100644 index 777c1f975590..000000000000 --- a/doc/api/next_api_changes/deprecations/23302-TH.rst +++ /dev/null @@ -1,4 +0,0 @@ -``stem(..., use_line_collection=False)`` -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -... is deprecated with no replacement. This was compatibility fallback to a -former more inefficient representation of the stem lines. diff --git a/doc/api/next_api_changes/deprecations/23348-AL.rst b/doc/api/next_api_changes/deprecations/23348-AL.rst deleted file mode 100644 index e4f0443f58e0..000000000000 --- a/doc/api/next_api_changes/deprecations/23348-AL.rst +++ /dev/null @@ -1,7 +0,0 @@ -The ``canvas`` and ``background`` attributes of ``MultiCursor`` -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -... are deprecated with no replacement. - -All parameters to ``MultiCursor`` starting from *useblit* -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -... are becoming keyword-only (passing them positionally is deprecated). diff --git a/doc/api/next_api_changes/deprecations/23444-AL.rst b/doc/api/next_api_changes/deprecations/23444-AL.rst deleted file mode 100644 index 6c4d4603ff9f..000000000000 --- a/doc/api/next_api_changes/deprecations/23444-AL.rst +++ /dev/null @@ -1,3 +0,0 @@ -The ``texcommand`` and ``latex_header`` attributes of ``backend_pgf.LatexManager`` -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -... are deprecated. diff --git a/doc/api/next_api_changes/deprecations/23448-AL.rst b/doc/api/next_api_changes/deprecations/23448-AL.rst deleted file mode 100644 index 11a1c6395c94..000000000000 --- a/doc/api/next_api_changes/deprecations/23448-AL.rst +++ /dev/null @@ -1,4 +0,0 @@ -``FigureCanvasBase.pick`` -~~~~~~~~~~~~~~~~~~~~~~~~~ -... is deprecated. Directly call `.Figure.pick`, which has taken over the -responsibility of checking the canvas widgetlock as well. diff --git a/doc/api/next_api_changes/deprecations/23455-OG.rst b/doc/api/next_api_changes/deprecations/23455-OG.rst deleted file mode 100644 index 826aef546a16..000000000000 --- a/doc/api/next_api_changes/deprecations/23455-OG.rst +++ /dev/null @@ -1,5 +0,0 @@ -``w_xaxis``, ``w_yaxis``, and ``w_zaxis`` of ``Axis3D`` -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -... have been pending deprecation since 3.1. They are now deprecated. -Instead use ``xaxis``, ``yaxis``, and ``zaxis``. diff --git a/doc/api/next_api_changes/deprecations/23463-OG.rst b/doc/api/next_api_changes/deprecations/23463-OG.rst deleted file mode 100644 index 7d8309462dbf..000000000000 --- a/doc/api/next_api_changes/deprecations/23463-OG.rst +++ /dev/null @@ -1,5 +0,0 @@ -``Tick.label`` -~~~~~~~~~~~~~~ - -... has been pending deprecation since 3.1 and is now deprecated. -Use ``Tick.label1`` instead. diff --git a/doc/api/next_api_changes/deprecations/23464-AL.rst b/doc/api/next_api_changes/deprecations/23464-AL.rst deleted file mode 100644 index 91ab83fc6fe9..000000000000 --- a/doc/api/next_api_changes/deprecations/23464-AL.rst +++ /dev/null @@ -1,2 +0,0 @@ -``FigureManagerMac.close`` is deprecated -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/doc/api/next_api_changes/deprecations/23469-AL.rst b/doc/api/next_api_changes/deprecations/23469-AL.rst deleted file mode 100644 index e045a9018ad6..000000000000 --- a/doc/api/next_api_changes/deprecations/23469-AL.rst +++ /dev/null @@ -1,3 +0,0 @@ -``axislines.GridHelperBase.new_gridlines`` and ``axislines.Axes.new_gridlines`` -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -... are deprecated. diff --git a/doc/api/next_api_changes/deprecations/23572-AL.rst b/doc/api/next_api_changes/deprecations/23572-AL.rst deleted file mode 100644 index 0569b3a73389..000000000000 --- a/doc/api/next_api_changes/deprecations/23572-AL.rst +++ /dev/null @@ -1,3 +0,0 @@ -``GridSpecBase.get_grid_positions(..., raw=True)`` -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -... is deprecated. diff --git a/doc/api/next_api_changes/deprecations/23647-OG.rst b/doc/api/next_api_changes/deprecations/23647-OG.rst deleted file mode 100644 index ee44f491812f..000000000000 --- a/doc/api/next_api_changes/deprecations/23647-OG.rst +++ /dev/null @@ -1,6 +0,0 @@ -``mplot3d.axis3d.Axis.set_pane_pos`` -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -... is deprecated. This is an internal method where the provided values are -overwritten during drawing. Hence, it does not serve any purpose to be -directly accessible. diff --git a/doc/api/next_api_changes/deprecations/23665-GL.rst b/doc/api/next_api_changes/deprecations/23665-GL.rst deleted file mode 100644 index 8cc893a7fa63..000000000000 --- a/doc/api/next_api_changes/deprecations/23665-GL.rst +++ /dev/null @@ -1,4 +0,0 @@ -The macosx backend toolbar ``prepare_configure_subplots`` -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - - has been replaced by ``configure_subplots()``. diff --git a/doc/api/next_api_changes/deprecations/23668-TC.rst b/doc/api/next_api_changes/deprecations/23668-TC.rst deleted file mode 100644 index d131ff497fb1..000000000000 --- a/doc/api/next_api_changes/deprecations/23668-TC.rst +++ /dev/null @@ -1,22 +0,0 @@ -Pending deprecation 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 with the intention of deprecation in Matplotlib 3.7. The -following functions have been marked for pending deprecation: - -- `matplotlib.cm.get_cmap` - use ``matplotlib.colormaps[name]`` instead -- `matplotlib.cm.register_cmap` - use ``matplotlib.colormaps.register`` instead -- `matplotlib.cm.unregister_cmap` - use ``matplotlib.colormaps.unregister`` instead -- ``matplotlib.pyplot.register_cmap`` - use ``matplotlib.colormaps.register`` instead - -The `matplotlib.pyplot.get_cmap` function will stay available for backward compatibility. diff --git a/doc/api/next_api_changes/deprecations/23675-OG.rst b/doc/api/next_api_changes/deprecations/23675-OG.rst deleted file mode 100644 index 1ab669c16b2a..000000000000 --- a/doc/api/next_api_changes/deprecations/23675-OG.rst +++ /dev/null @@ -1,7 +0,0 @@ -Helper functions in ``mplot3d.axis3d`` -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -The two helper functions ``move_from_center`` and ``tick_update_position`` are -considered internal and deprecated. If these are required, please vendor the -code from the corresponding private methods ``_move_from_center`` and -``_tick_update_position``. 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/ZZZZZ-AL.rst b/doc/api/next_api_changes/deprecations/ZZZZZ-AL.rst deleted file mode 100644 index 845a7c063c77..000000000000 --- a/doc/api/next_api_changes/deprecations/ZZZZZ-AL.rst +++ /dev/null @@ -1,4 +0,0 @@ -``mlab.stride_windows`` -~~~~~~~~~~~~~~~~~~~~~~~ -... is deprecated. Use ``np.lib.stride_tricks.sliding_window_view`` instead -(or ``np.lib.stride_tricks.as_strided`` on numpy<1.20). diff --git a/doc/api/prev_api_changes/api_changes_3.6.0.rst b/doc/api/prev_api_changes/api_changes_3.6.0.rst index 5f2a7648a955..1bba4506fd7d 100644 --- a/doc/api/prev_api_changes/api_changes_3.6.0.rst +++ b/doc/api/prev_api_changes/api_changes_3.6.0.rst @@ -7,6 +7,8 @@ API Changes for 3.6.0 .. include:: /api/prev_api_changes/api_changes_3.6.0/behaviour.rst +.. include:: /api/prev_api_changes/api_changes_3.6.0/deprecations.rst + .. include:: /api/prev_api_changes/api_changes_3.6.0/removals.rst .. include:: /api/prev_api_changes/api_changes_3.6.0/development.rst diff --git a/doc/api/prev_api_changes/api_changes_3.6.0/deprecations.rst b/doc/api/prev_api_changes/api_changes_3.6.0/deprecations.rst new file mode 100644 index 000000000000..d59077d2b2d2 --- /dev/null +++ b/doc/api/prev_api_changes/api_changes_3.6.0/deprecations.rst @@ -0,0 +1,409 @@ +Deprecations +------------ + +Parameters to ``plt.figure()`` and the ``Figure`` constructor +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +All parameters to `.pyplot.figure` and the `.Figure` constructor, other than +*num*, *figsize*, and *dpi*, will become keyword-only after a deprecation +period. + +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`. + +``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. + +Pending deprecation 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 with the intention of deprecation in Matplotlib 3.7. The following +functions have been marked for pending deprecation: + +- ``matplotlib.cm.get_cmap``; use ``matplotlib.colormaps[name]`` instead +- ``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. + +Pending deprecation of layout methods +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +The methods `~.Figure.set_tight_layout`, `~.Figure.set_constrained_layout`, are +discouraged, and now emit a `PendingDeprecationWarning` in favor of explicitly +referencing the layout engine via ``figure.set_layout_engine('tight')`` and +``figure.set_layout_engine('constrained')``. End users should not see the +warning, but library authors should adjust. + +The methods `~.Figure.set_constrained_layout_pads` and +`~.Figure.get_constrained_layout_pads` are will be deprecated in favor of +``figure.get_layout_engine().set()`` and ``figure.get_layout_engine().get()``, +and currently emit a `PendingDeprecationWarning`. + +seaborn styles renamed +~~~~~~~~~~~~~~~~~~~~~~ + +Matplotlib currently ships many style files inspired from the seaborn library +("seaborn", "seaborn-bright", "seaborn-colorblind", etc.) but they have gone +out of sync with the library itself since the release of seaborn 0.9. To +prevent confusion, the style files have been renamed "seaborn-v0_8", +"seaborn-v0_8-bright", "seaborn-v0_8-colorblind", etc. Users are encouraged to +directly use seaborn to access the up-to-date styles. + +Auto-removal of overlapping Axes by ``plt.subplot`` and ``plt.subplot2grid`` +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Previously, `.pyplot.subplot` and `.pyplot.subplot2grid` would automatically +remove preexisting Axes that overlap with the newly added Axes. This behavior +was deemed confusing, and is now deprecated. Explicitly call ``ax.remove()`` on +Axes that need to be removed. + +Passing *linefmt* positionally to ``stem`` is undeprecated +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Positional use of all formatting parameters in `~.Axes.stem` has been +deprecated since Matplotlib 3.5. This deprecation is relaxed so that one can +still pass *linefmt* positionally, i.e. ``stem(x, y, 'r')``. + +``stem(..., use_line_collection=False)`` +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +... is deprecated with no replacement. This was a compatibility fallback to a +former more inefficient representation of the stem lines. + +Positional / keyword arguments +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Passing all but the very few first arguments positionally in the constructors +of Artists is deprecated. Most arguments will become keyword-only in a future +version. + +Passing too many positional arguments to ``tripcolor`` is now deprecated (extra +arguments were previously silently ignored). + +Passing *emit* and *auto* parameters of ``set_xlim``, ``set_ylim``, +``set_zlim``, ``set_rlim`` positionally is deprecated; they will become +keyword-only in a future release. + +The *transOffset* parameter of `.Collection.set_offset_transform` and the +various ``create_collection`` methods of legend handlers has been renamed to +*offset_transform* (consistently with the property name). + +Calling ``MarkerStyle()`` with no arguments or ``MarkerStyle(None)`` is +deprecated; use ``MarkerStyle("")`` to construct an empty marker style. + +``Axes.get_window_extent`` / ``Figure.get_window_extent`` accept only +*renderer*. This aligns the API with the general `.Artist.get_window_extent` +API. All other parameters were ignored anyway. + +The *cleared* parameter of ``get_renderer``, which only existed for AGG-based +backends, has been deprecated. Use ``renderer.clear()`` instead to explicitly +clear the renderer buffer. + +Methods to set parameters in ``LogLocator`` and ``LogFormatter*`` +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +In `~.LogFormatter` and derived subclasses, the methods ``base`` and +``label_minor`` for setting the respective parameter are deprecated and +replaced by ``set_base`` and ``set_label_minor``, respectively. + +In `~.LogLocator`, the methods ``base`` and ``subs`` for setting the respective +parameter are deprecated. Instead, use ``set_params(base=..., subs=...)``. + +``Axes.get_renderer_cache`` +~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +The canvas now takes care of the renderer and whether to cache it or not. The +alternative is to call ``axes.figure.canvas.get_renderer()``. + +Groupers from ``get_shared_x_axes`` / ``get_shared_y_axes`` will be immutable +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Modifications to the Groupers returned by ``get_shared_x_axes`` and +``get_shared_y_axes`` are deprecated. In the future, these methods will return +immutable views on the grouper structures. Note that previously, calling e.g. +``join()`` would already fail to set up the correct structures for sharing +axes; use `.Axes.sharex` or `.Axes.sharey` instead. + +Unused methods in ``Axis``, ``Tick``, ``XAxis``, and ``YAxis`` +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +``Tick.label`` has been pending deprecation since 3.1 and is now deprecated. +Use ``Tick.label1`` instead. + +The following methods are no longer used and deprecated without a replacement: + +- ``Axis.get_ticklabel_extents`` +- ``Tick.get_pad_pixels`` +- ``XAxis.get_text_heights`` +- ``YAxis.get_text_widths`` + +``mlab.stride_windows`` +~~~~~~~~~~~~~~~~~~~~~~~ + +... is deprecated. Use ``np.lib.stride_tricks.sliding_window_view`` instead (or +``np.lib.stride_tricks.as_strided`` on NumPy < 1.20). + +Event handlers +~~~~~~~~~~~~~~ + +The ``draw_event``, ``resize_event``, ``close_event``, ``key_press_event``, +``key_release_event``, ``pick_event``, ``scroll_event``, +``button_press_event``, ``button_release_event``, ``motion_notify_event``, +``enter_notify_event`` and ``leave_notify_event`` methods of +`.FigureCanvasBase` are deprecated. They had inconsistent signatures across +backends, and made it difficult to improve event metadata. + +In order to trigger an event on a canvas, directly construct an `.Event` object +of the correct class and call ``canvas.callbacks.process(event.name, event)``. + +Widgets +~~~~~~~ + +All parameters to ``MultiCursor`` starting from *useblit* are becoming +keyword-only (passing them positionally is deprecated). + +The ``canvas`` and ``background`` attributes of ``MultiCursor`` are deprecated +with no replacement. + +The *visible* attribute of Selector widgets has been deprecated; use +``set_visible`` or ``get_visible`` instead. + +The *state_modifier_keys* attribute of Selector widgets has been privatized and +the modifier keys must be set when creating the widget. + +``Axes3D.dist`` +~~~~~~~~~~~~~~~ + +... has been privatized. Use the *zoom* keyword argument in +`.Axes3D.set_box_aspect` instead. + +3D Axis +~~~~~~~ + +The previous constructor of `.axis3d.Axis`, with signature ``(self, adir, +v_intervalx, d_intervalx, axes, *args, rotate_label=None, **kwargs)`` is +deprecated in favor of a new signature closer to the one of 2D Axis; it is now +``(self, axes, *, rotate_label=None, **kwargs)`` where ``kwargs`` are forwarded +to the 2D Axis constructor. The axis direction is now inferred from the axis +class' ``axis_name`` attribute (as in the 2D case); the ``adir`` attribute is +deprecated. + +The ``init3d`` method of 3D Axis is also deprecated; all the relevant +initialization is done as part of the constructor. + +The ``d_interval`` and ``v_interval`` attributes of 3D Axis are deprecated; use +``get_data_interval`` and ``get_view_interval`` instead. + +The ``w_xaxis``, ``w_yaxis``, and ``w_zaxis`` attributes of ``Axis3D`` have +been pending deprecation since 3.1. They are now deprecated. Instead use +``xaxis``, ``yaxis``, and ``zaxis``. + +``mplot3d.axis3d.Axis.set_pane_pos`` is deprecated. This is an internal method +where the provided values are overwritten during drawing. Hence, it does not +serve any purpose to be directly accessible. + +The two helper functions ``mplot3d.axis3d.move_from_center`` and +``mplot3d.axis3d.tick_update_position`` are considered internal and deprecated. +If these are required, please vendor the code from the corresponding private +methods ``_move_from_center`` and ``_tick_update_position``. + +``Figure.callbacks`` is deprecated +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +The Figure ``callbacks`` property is deprecated. The only signal was +"dpi_changed", which can be replaced by connecting to the "resize_event" on the +canvas ``figure.canvas.mpl_connect("resize_event", func)`` instead. + +``FigureCanvas`` without a ``required_interactive_framework`` attribute +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Support for such canvas classes is deprecated. Note that canvas classes which +inherit from ``FigureCanvasBase`` always have such an attribute. + +Backend-specific deprecations +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +- ``backend_gtk3.FigureManagerGTK3Agg`` and + ``backend_gtk4.FigureManagerGTK4Agg``; directly use + ``backend_gtk3.FigureManagerGTK3`` and ``backend_gtk4.FigureManagerGTK4`` + instead. +- The *window* parameter to ``backend_gtk3.NavigationToolbar2GTK3`` had no + effect, and is now deprecated. +- ``backend_gtk3.NavigationToolbar2GTK3.win`` +- ``backend_gtk3.RendererGTK3Cairo`` and ``backend_gtk4.RendererGTK4Cairo``; + use `.RendererCairo` instead, which has gained the ``set_context`` method, + which also auto-infers the size of the underlying surface. +- ``backend_cairo.RendererCairo.set_ctx_from_surface`` and + ``backend_cairo.RendererCairo.set_width_height`` in favor of + `.RendererCairo.set_context`. +- ``backend_gtk3.error_msg_gtk`` +- ``backend_gtk3.icon_filename`` and ``backend_gtk3.window_icon`` +- ``backend_macosx.NavigationToolbar2Mac.prepare_configure_subplots`` has been + replaced by ``configure_subplots()``. +- ``backend_pdf.Name.hexify`` +- ``backend_pdf.Operator`` and ``backend_pdf.Op.op`` are deprecated in favor of + a single standard `enum.Enum` interface on `.backend_pdf.Op`. +- ``backend_pdf.fill``; vendor the code of the similarly named private + functions if you rely on these functions. +- ``backend_pgf.LatexManager.texcommand`` and + ``backend_pgf.LatexManager.latex_header`` +- ``backend_pgf.NO_ESCAPE`` +- ``backend_pgf.common_texification`` +- ``backend_pgf.get_fontspec`` +- ``backend_pgf.get_preamble`` +- ``backend_pgf.re_mathsep`` +- ``backend_pgf.writeln`` +- ``backend_ps.convert_psfrags`` +- ``backend_ps.quote_ps_string``; vendor the code of the similarly named + private functions if you rely on it. +- ``backend_qt.qApp``; use ``QtWidgets.QApplication.instance()`` instead. +- ``backend_svg.escape_attrib``; vendor the code of the similarly named private + functions if you rely on it. +- ``backend_svg.escape_cdata``; vendor the code of the similarly named private + functions if you rely on it. +- ``backend_svg.escape_comment``; vendor the code of the similarly named + private functions if you rely on it. +- ``backend_svg.short_float_fmt``; vendor the code of the similarly named + private functions if you rely on it. +- ``backend_svg.generate_transform`` and ``backend_svg.generate_css`` +- ``backend_tk.NavigationToolbar2Tk.lastrect`` and + ``backend_tk.RubberbandTk.lastrect`` +- ``backend_tk.NavigationToolbar2Tk.window``; use ``toolbar.master`` instead. +- ``backend_tools.ToolBase.destroy``; To run code upon tool removal, connect to + the ``tool_removed_event`` event. +- ``backend_wx.RendererWx.offset_text_height`` +- ``backend_wx.error_msg_wx`` + +- ``FigureCanvasBase.pick``; directly call `.Figure.pick`, which has taken over + the responsibility of checking the canvas widget lock as well. +- ``FigureCanvasBase.resize``, which has no effect; use + ``FigureManagerBase.resize`` instead. + +- ``FigureManagerMac.close`` + +- ``FigureFrameWx.sizer``; use ``frame.GetSizer()`` instead. +- ``FigureFrameWx.figmgr`` and ``FigureFrameWx.get_figure_manager``; use + ``frame.canvas.manager`` instead. +- ``FigureFrameWx.num``; use ``frame.canvas.manager.num`` instead. +- ``FigureFrameWx.toolbar``; use ``frame.GetToolBar()`` instead. +- ``FigureFrameWx.toolmanager``; use ``frame.canvas.manager.toolmanager`` + instead. + +Modules +~~~~~~~ + +The modules ``matplotlib.afm``, ``matplotlib.docstring``, +``matplotlib.fontconfig_pattern``, ``matplotlib.tight_bbox``, +``matplotlib.tight_layout``, and ``matplotlib.type1font`` are considered +internal and public access is deprecated. + +``checkdep_usetex`` deprecated +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +This method was only intended to disable tests in case no latex install was +found. As such, it is considered to be private and for internal use only. + +Please vendor the code if you need this. + +``date_ticker_factory`` deprecated +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +The ``date_ticker_factory`` method in the `matplotlib.dates` module is +deprecated. Instead use `~.AutoDateLocator` and `~.AutoDateFormatter` for a +more flexible and scalable locator and formatter. + +If you need the exact ``date_ticker_factory`` behavior, please copy the code. + +``dviread.find_tex_file`` will raise ``FileNotFoundError`` +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +In the future, ``dviread.find_tex_file`` will raise a `FileNotFoundError` for +missing files. Previously, it would return an empty string in such cases. +Raising an exception allows attaching a user-friendly message instead. During +the transition period, a warning is raised. + +``transforms.Affine2D.identity()`` +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +... is deprecated in favor of directly calling the `.Affine2D` constructor with +no arguments. + +Deprecations in ``testing.decorators`` +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +The unused class ``CleanupTestCase`` and decorator ``cleanup`` are deprecated +and will be removed. Vendor the code, including the private function +``_cleanup_cm``. + +The function ``check_freetype_version`` is considered internal and deprecated. +Vendor the code of the private function ``_check_freetype_version``. + +``text.get_rotation()`` +~~~~~~~~~~~~~~~~~~~~~~~ + +... is deprecated with no replacement. Copy the original implementation if +needed. + +Miscellaneous internals +~~~~~~~~~~~~~~~~~~~~~~~ + +- ``axes_grid1.axes_size.AddList``; use ``sum(sizes, start=Fixed(0))`` (for + example) to sum multiple size objects. +- ``axes_size.Padded``; use ``size + pad`` instead +- ``axes_size.SizeFromFunc``, ``axes_size.GetExtentHelper`` +- ``AxisArtistHelper.delta1`` and ``AxisArtistHelper.delta2`` +- ``axislines.GridHelperBase.new_gridlines`` and + ``axislines.Axes.new_gridlines`` +- ``cbook.maxdict``; use the standard library ``functools.lru_cache`` instead. +- ``_DummyAxis.dataLim`` and ``_DummyAxis.viewLim``; use + ``get_data_interval()``, ``set_data_interval()``, ``get_view_interval()``, + and ``set_view_interval()`` instead. +- ``GridSpecBase.get_grid_positions(..., raw=True)`` +- ``ImageMagickBase.delay`` and ``ImageMagickBase.output_args`` +- ``MathtextBackend``, ``MathtextBackendAgg``, ``MathtextBackendPath``, + ``MathTextWarning`` +- ``TexManager.get_font_config``; it previously returned an internal hashed key + for used for caching purposes. +- ``TextToPath.get_texmanager``; directly construct a `.texmanager.TexManager` + instead. +- ``ticker.is_close_to_int``; use ``math.isclose(x, round(x))`` instead. +- ``ticker.is_decade``; use ``y = numpy.log(x)/numpy.log(base); + numpy.isclose(y, numpy.round(y))`` instead. From 4b9903b0b8de162f0a170bc5eaf45f6e21cd4ac8 Mon Sep 17 00:00:00 2001 From: Elliott Sales de Andrade Date: Thu, 8 Sep 2022 06:13:53 -0400 Subject: [PATCH 5/8] Consolidate What's new for 3.6 --- doc/users/next_whats_new/3d_plot_aspects.rst | 33 -- .../next_whats_new/3d_plot_focal_length.rst | 31 - .../next_whats_new/3d_plot_roll_angle.rst | 22 - doc/users/next_whats_new/asinh_scale.rst | 32 -- doc/users/next_whats_new/bar_plot_labels.rst | 16 - .../color_support_for_math_to_image.rst | 11 - .../next_whats_new/custom_cap_widths.rst | 16 - .../double_quotes_matplolibrc.rst | 10 - .../next_whats_new/extending_MarkerStyle.rst | 19 - .../next_whats_new/figure_label_rcparams.rst | 10 - .../next_whats_new/fix_dash_offset_Patch.rst | 5 - doc/users/next_whats_new/font_fallback.rst | 27 - .../inset_axes_improvements.rst | 6 - doc/users/next_whats_new/layout_engine.rst | 7 - doc/users/next_whats_new/legend_align.rst | 6 - doc/users/next_whats_new/list_font_names.rst | 10 - doc/users/next_whats_new/marker_none.rst | 5 - .../next_whats_new/min_macos_version.rst | 3 - .../modify_stairs_fill_edge_behaviour.rst | 9 - .../multicursor_multifigure.rst | 8 - .../next_whats_new/no_broken_streamlines.rst | 25 - .../plt_xyticks_support_minor.rst | 15 - .../next_whats_new/polygon_selector_box.rst | 6 - .../next_whats_new/polygon_vert_setter.rst | 6 - .../rectangle_patch_rotation.rst | 5 - .../rename_ncol_keyword_in_legend.rst | 7 - .../next_whats_new/resample_colormaps.rst | 13 - .../next_whats_new/selector_improvement.rst | 40 -- doc/users/next_whats_new/snap_selector.rst | 4 - doc/users/next_whats_new/striped_lines.rst | 19 - doc/users/next_whats_new/strnorm.rst | 6 - .../url_active_areas_rotate.rst | 5 - doc/users/next_whats_new/use_contourpy.rst | 27 - .../next_whats_new/width_height_ratios.rst | 7 - doc/users/next_whats_new/windows_arm64.rst | 8 - doc/users/prev_whats_new/whats_new_3.6.0.rst | 534 ++++++++++++++++++ doc/users/release_notes.rst | 5 +- 37 files changed, 537 insertions(+), 481 deletions(-) delete mode 100644 doc/users/next_whats_new/3d_plot_aspects.rst delete mode 100644 doc/users/next_whats_new/3d_plot_focal_length.rst delete mode 100644 doc/users/next_whats_new/3d_plot_roll_angle.rst delete mode 100644 doc/users/next_whats_new/asinh_scale.rst delete mode 100644 doc/users/next_whats_new/bar_plot_labels.rst delete mode 100644 doc/users/next_whats_new/color_support_for_math_to_image.rst delete mode 100644 doc/users/next_whats_new/custom_cap_widths.rst delete mode 100644 doc/users/next_whats_new/double_quotes_matplolibrc.rst delete mode 100644 doc/users/next_whats_new/extending_MarkerStyle.rst delete mode 100644 doc/users/next_whats_new/figure_label_rcparams.rst delete mode 100644 doc/users/next_whats_new/fix_dash_offset_Patch.rst delete mode 100644 doc/users/next_whats_new/font_fallback.rst delete mode 100644 doc/users/next_whats_new/inset_axes_improvements.rst delete mode 100644 doc/users/next_whats_new/layout_engine.rst delete mode 100644 doc/users/next_whats_new/legend_align.rst delete mode 100644 doc/users/next_whats_new/list_font_names.rst delete mode 100644 doc/users/next_whats_new/marker_none.rst delete mode 100644 doc/users/next_whats_new/min_macos_version.rst delete mode 100644 doc/users/next_whats_new/modify_stairs_fill_edge_behaviour.rst delete mode 100644 doc/users/next_whats_new/multicursor_multifigure.rst delete mode 100644 doc/users/next_whats_new/no_broken_streamlines.rst delete mode 100644 doc/users/next_whats_new/plt_xyticks_support_minor.rst delete mode 100644 doc/users/next_whats_new/polygon_selector_box.rst delete mode 100644 doc/users/next_whats_new/polygon_vert_setter.rst delete mode 100644 doc/users/next_whats_new/rectangle_patch_rotation.rst delete mode 100644 doc/users/next_whats_new/rename_ncol_keyword_in_legend.rst delete mode 100644 doc/users/next_whats_new/resample_colormaps.rst delete mode 100644 doc/users/next_whats_new/selector_improvement.rst delete mode 100644 doc/users/next_whats_new/snap_selector.rst delete mode 100644 doc/users/next_whats_new/striped_lines.rst delete mode 100644 doc/users/next_whats_new/strnorm.rst delete mode 100644 doc/users/next_whats_new/url_active_areas_rotate.rst delete mode 100644 doc/users/next_whats_new/use_contourpy.rst delete mode 100644 doc/users/next_whats_new/width_height_ratios.rst delete mode 100644 doc/users/next_whats_new/windows_arm64.rst create mode 100644 doc/users/prev_whats_new/whats_new_3.6.0.rst diff --git a/doc/users/next_whats_new/3d_plot_aspects.rst b/doc/users/next_whats_new/3d_plot_aspects.rst deleted file mode 100644 index a65160b4face..000000000000 --- a/doc/users/next_whats_new/3d_plot_aspects.rst +++ /dev/null @@ -1,33 +0,0 @@ -Set equal aspect ratio for 3D plots ------------------------------------ - -Users can set the aspect ratio for the X, Y, Z axes of a 3D plot to be 'equal', -'equalxy', 'equalxz', or 'equalyz' rather than the default of 'auto'. - -.. 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'}) - - # Draw rectangular cuboid with side lengths [1, 1, 5] - r = [0, 1] - scale = np.array([1, 1, 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_box_aspect((3, 4, 5)) - ax.set_aspect(aspects[i]) - ax.set_title(f"set_aspect('{aspects[i]}')") - - fig.set_size_inches(13, 3) - plt.show() diff --git a/doc/users/next_whats_new/3d_plot_focal_length.rst b/doc/users/next_whats_new/3d_plot_focal_length.rst deleted file mode 100644 index 41750851dc06..000000000000 --- a/doc/users/next_whats_new/3d_plot_focal_length.rst +++ /dev/null @@ -1,31 +0,0 @@ -Give the 3D camera a custom focal length ----------------------------------------- - -Users can now better mimic real-world cameras by specifying the focal length of -the virtual camera in 3D plots. The default focal length of 1 corresponds to a -Field of View (FOV) of 90 deg, and is backwards-compatible with existing 3D -plots. An increased focal length between 1 and infinity "flattens" the image, -while a decreased focal length between 1 and 0 exaggerates the perspective and -gives the image more apparent depth. - -The focal length can be calculated from a desired FOV via the equation: - -.. mathmpl:: - - focal\_length = 1/\tan(FOV/2) - -.. plot:: - :include-source: true - - from mpl_toolkits.mplot3d import axes3d - import matplotlib.pyplot as plt - from numpy import inf - fig, axs = plt.subplots(1, 3, subplot_kw={'projection': '3d'}) - X, Y, Z = axes3d.get_test_data(0.05) - focal_lengths = [0.2, 1, inf] - for ax, fl in zip(axs, focal_lengths): - ax.plot_wireframe(X, Y, Z, rstride=10, cstride=10) - ax.set_proj_type('persp', focal_length=fl) - ax.set_title(f"focal_length = {fl}") - fig.set_size_inches(10, 4) - plt.show() diff --git a/doc/users/next_whats_new/3d_plot_roll_angle.rst b/doc/users/next_whats_new/3d_plot_roll_angle.rst deleted file mode 100644 index 66674297077b..000000000000 --- a/doc/users/next_whats_new/3d_plot_roll_angle.rst +++ /dev/null @@ -1,22 +0,0 @@ -3D plots gained a 3rd "roll" viewing angle ------------------------------------------- - -3D plots can now be viewed from any orientation with the addition of a 3rd roll -angle, which rotates the plot about the viewing axis. Interactive rotation -using the mouse still only controls elevation and azimuth, meaning that this -feature is relevant to users who create more complex camera angles -programmatically. The default roll angle of 0 is backwards-compatible with -existing 3D plots. - -.. plot:: - :include-source: true - - from mpl_toolkits.mplot3d import axes3d - import matplotlib.pyplot as plt - fig = plt.figure() - ax = fig.add_subplot(projection='3d') - X, Y, Z = axes3d.get_test_data(0.05) - ax.plot_wireframe(X, Y, Z, rstride=10, cstride=10) - ax.view_init(elev=0, azim=0, roll=30) - ax.set_title('elev=0, azim=0, roll=30') - plt.show() diff --git a/doc/users/next_whats_new/asinh_scale.rst b/doc/users/next_whats_new/asinh_scale.rst deleted file mode 100644 index 69238ebe220a..000000000000 --- a/doc/users/next_whats_new/asinh_scale.rst +++ /dev/null @@ -1,32 +0,0 @@ -New axis scale ``asinh`` (experimental) ---------------------------------------- - -The new ``asinh`` axis scale offers an alternative to ``symlog`` that -smoothly transitions between the quasi-linear and asymptotically logarithmic -regions of the scale. This is based on an arcsinh transformation that -allows plotting both positive and negative values that span many orders -of magnitude. - -.. plot:: - - import matplotlib.pyplot as plt - import numpy as np - - fig, (ax0, ax1) = plt.subplots(1, 2, sharex=True) - x = np.linspace(-3, 6, 100) - - ax0.plot(x, x) - ax0.set_yscale('symlog') - ax0.grid() - ax0.set_title('symlog') - - ax1.plot(x, x) - ax1.set_yscale('asinh') - ax1.grid() - ax1.set_title(r'$sinh^{-1}$') - - for p in (-2, 2): - for ax in (ax0, ax1): - c = plt.Circle((p, p), radius=0.5, fill=False, - color='red', alpha=0.8, lw=3) - ax.add_patch(c) diff --git a/doc/users/next_whats_new/bar_plot_labels.rst b/doc/users/next_whats_new/bar_plot_labels.rst deleted file mode 100644 index 6da57a317f59..000000000000 --- a/doc/users/next_whats_new/bar_plot_labels.rst +++ /dev/null @@ -1,16 +0,0 @@ -Easier labelling of bars in bar plot ------------------------------------- - -The ``label`` argument of `~matplotlib.axes.Axes.bar` can now -be passed a list of labels for the bars. - -.. code-block:: python - - import matplotlib.pyplot as plt - - x = ["a", "b", "c"] - y = [10, 20, 15] - - fig, ax = plt.subplots() - bar_container = ax.barh(x, y, label=x) - [bar.get_label() for bar in bar_container] diff --git a/doc/users/next_whats_new/color_support_for_math_to_image.rst b/doc/users/next_whats_new/color_support_for_math_to_image.rst deleted file mode 100644 index 3c4f376349a6..000000000000 --- a/doc/users/next_whats_new/color_support_for_math_to_image.rst +++ /dev/null @@ -1,11 +0,0 @@ -``math_to_image`` now has a *color* keyword argument --------------------------------------------------------- - -To easily support external libraries that rely on the MathText rendering of -Matplotlib to generate equation images, a *color* keyword argument was added -to `~matplotlib.mathtext.math_to_image`. - -.. code-block:: python - - from matplotlib import mathtext - mathtext.math_to_image('$x^2$', 'filename.png', color='Maroon') diff --git a/doc/users/next_whats_new/custom_cap_widths.rst b/doc/users/next_whats_new/custom_cap_widths.rst deleted file mode 100644 index 137b9b6839f8..000000000000 --- a/doc/users/next_whats_new/custom_cap_widths.rst +++ /dev/null @@ -1,16 +0,0 @@ -Custom cap widths in box and whisker plots in bxp() and boxplot() ------------------------------------------------------------------ - -New bxp() and boxplot() parameter capwidths allows to control the -widths of the caps in box and whisker plots. - -.. plot:: - :include-source: true - - import matplotlib.pyplot as plt - import numpy as np - x = np.linspace(-7, 7, 140) - x = np.hstack([-25, x, 25]) - fig, ax = plt.subplots() - ax.boxplot([x, x], notch=True, capwidths=[0.01, 0.2]) - plt.show() diff --git a/doc/users/next_whats_new/double_quotes_matplolibrc.rst b/doc/users/next_whats_new/double_quotes_matplolibrc.rst deleted file mode 100644 index e40c1be750b2..000000000000 --- a/doc/users/next_whats_new/double_quotes_matplolibrc.rst +++ /dev/null @@ -1,10 +0,0 @@ -Double-quoted strings in matplotlibrc -------------------------------------- - -You can now use double-quotes around strings. This allows using the '#' -character in strings. Without quotes, '#' is interpreted as start of a comment. -In particular, you can now define hex-colors: - -.. code-block:: none - - grid.color: "#b0b0b0" diff --git a/doc/users/next_whats_new/extending_MarkerStyle.rst b/doc/users/next_whats_new/extending_MarkerStyle.rst deleted file mode 100644 index f31585a70b1c..000000000000 --- a/doc/users/next_whats_new/extending_MarkerStyle.rst +++ /dev/null @@ -1,19 +0,0 @@ -New customization of MarkerStyle --------------------------------- - -New MarkerStyle parameters allow control of join style and cap style, and for -the user to supply a transformation to be applied to the marker (e.g. a rotation). - -.. plot:: - :include-source: true - - import matplotlib.pyplot as plt - from matplotlib.markers import MarkerStyle - from matplotlib.transforms import Affine2D - fig, ax = plt.subplots(figsize=(6, 1)) - fig.suptitle('New markers', fontsize=14) - for col, (size, rot) in enumerate(zip([2, 5, 10], [0, 45, 90])): - t = Affine2D().rotate_deg(rot).scale(size) - ax.plot(col, 0, marker=MarkerStyle("*", transform=t)) - ax.axis("off") - ax.set_xlim(-0.1, 2.4) diff --git a/doc/users/next_whats_new/figure_label_rcparams.rst b/doc/users/next_whats_new/figure_label_rcparams.rst deleted file mode 100644 index 149da1e92cf0..000000000000 --- a/doc/users/next_whats_new/figure_label_rcparams.rst +++ /dev/null @@ -1,10 +0,0 @@ -Allow setting figure label size and weight globally and separately from title ------------------------------------------------------------------------------ - -The figure labels, ``Figure.supxlabel`` and ``Figure.supylabel``, size and -weight can be set separately from the figure title. Use :rc:`figure.labelsize` -and :rc:`figure.labelweight`. - -Note that if you have locally changed :rc:`figure.titlesize` or -:rc:`figure.titleweight`, you must now also change the introduced parameters -for a consistent result. diff --git a/doc/users/next_whats_new/fix_dash_offset_Patch.rst b/doc/users/next_whats_new/fix_dash_offset_Patch.rst deleted file mode 100644 index 7be55858f70f..000000000000 --- a/doc/users/next_whats_new/fix_dash_offset_Patch.rst +++ /dev/null @@ -1,5 +0,0 @@ -Fix the dash offset of the Patch class --------------------------------------- -Traditionally, when setting the linestyle on a `.Patch` object using a dash tuple the -offset was ignored. Now the offset is passed to the draw method of Patch as expected -and it can be used as it is used with Line2D objects. diff --git a/doc/users/next_whats_new/font_fallback.rst b/doc/users/next_whats_new/font_fallback.rst deleted file mode 100644 index 51d9143147ce..000000000000 --- a/doc/users/next_whats_new/font_fallback.rst +++ /dev/null @@ -1,27 +0,0 @@ -Font fallback -------------- - -It is now possible to specify a list of fonts families and Matplotlib -will try them in order to locate a required glyph. - -.. plot:: - :caption: Demonstration of mixed English and Chinese text with font fallback. - :alt: The phrase "There are 几个汉字 in between!" rendered in various fonts. - :include-source: True - - import matplotlib.pyplot as plt - - text = "There are 几个汉字 in between!" - - plt.rcParams["font.size"] = 20 - fig = plt.figure(figsize=(4.75, 1.85)) - fig.text(0.05, 0.85, text, family=["WenQuanYi Zen Hei"]) - fig.text(0.05, 0.65, text, family=["Noto Sans CJK JP"]) - fig.text(0.05, 0.45, text, family=["DejaVu Sans", "Noto Sans CJK JP"]) - fig.text(0.05, 0.25, text, family=["DejaVu Sans", "WenQuanYi Zen Hei"]) - - plt.show() - - -This currently works with the Agg (and all of the GUI embeddings), svg, pdf, -ps, and inline backends. diff --git a/doc/users/next_whats_new/inset_axes_improvements.rst b/doc/users/next_whats_new/inset_axes_improvements.rst deleted file mode 100644 index ad4918120a84..000000000000 --- a/doc/users/next_whats_new/inset_axes_improvements.rst +++ /dev/null @@ -1,6 +0,0 @@ -Axes.inset_axes flexibility ---------------------------- - -`matplotlib.axes.Axes.inset_axes` now accepts the *projection*, *polar* and -*axes_class* keyword arguments, so that subclasses of `matplotlib.axes.Axes` may -be returned. diff --git a/doc/users/next_whats_new/layout_engine.rst b/doc/users/next_whats_new/layout_engine.rst deleted file mode 100644 index 9304ee9771e0..000000000000 --- a/doc/users/next_whats_new/layout_engine.rst +++ /dev/null @@ -1,7 +0,0 @@ -New ``layout_engine`` module -~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -Matplotlib ships with ``tight_layout`` and ``constrained_layout`` layout -engines. A new ``layout_engine`` module is provided to allow downstream -libraries to write their own layout engines and `~.figure.Figure` objects can -now take a `.LayoutEngine` subclass as an argument to the *layout* parameter. diff --git a/doc/users/next_whats_new/legend_align.rst b/doc/users/next_whats_new/legend_align.rst deleted file mode 100644 index 4a1d479c8e27..000000000000 --- a/doc/users/next_whats_new/legend_align.rst +++ /dev/null @@ -1,6 +0,0 @@ -Legend can control alignment of title and handles -------------------------------------------------- - -`.Legend` now supports control the alignment of title and handles via the -keyword argument ``alignment``. You can also use `.Legend.set_alignment` -to control the alignment on existing Legends. diff --git a/doc/users/next_whats_new/list_font_names.rst b/doc/users/next_whats_new/list_font_names.rst deleted file mode 100644 index d3737cd8ba55..000000000000 --- a/doc/users/next_whats_new/list_font_names.rst +++ /dev/null @@ -1,10 +0,0 @@ -List of available font names ------------------------------- - -The list of available fonts are now easily accessible. Get a list of the -available font names in matplotlib with: - -.. code-block:: python - - from matplotlib import font_manager - font_manager.get_font_names() diff --git a/doc/users/next_whats_new/marker_none.rst b/doc/users/next_whats_new/marker_none.rst deleted file mode 100644 index b37f07ea1333..000000000000 --- a/doc/users/next_whats_new/marker_none.rst +++ /dev/null @@ -1,5 +0,0 @@ -``marker`` can now be set to the string "none" -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -... to mean *no-marker*, consistently with other APIs which support the -lowercase version. Using "none" is recommended over using "None", to avoid -confusion with the None object. diff --git a/doc/users/next_whats_new/min_macos_version.rst b/doc/users/next_whats_new/min_macos_version.rst deleted file mode 100644 index 8d3a8f04fcdb..000000000000 --- a/doc/users/next_whats_new/min_macos_version.rst +++ /dev/null @@ -1,3 +0,0 @@ -New minimum macOS version -------------------------- -The macosx backend now requires macOS >= 10.12. diff --git a/doc/users/next_whats_new/modify_stairs_fill_edge_behaviour.rst b/doc/users/next_whats_new/modify_stairs_fill_edge_behaviour.rst deleted file mode 100644 index 1dc24a20907a..000000000000 --- a/doc/users/next_whats_new/modify_stairs_fill_edge_behaviour.rst +++ /dev/null @@ -1,9 +0,0 @@ -stairs(..., fill=True) to hide patch edge by setting lw=0 ---------------------------------------------------------- - -``stairs(..., fill=True)`` would previously hide Patch -edge by setting edgecolor="none". Calling ``set_color()`` -on the Patch after would make the Patch appear larger. -Updated treatment prevents this. Likewise calling -``stairs(..., fill=True, lw=3)`` will behave more -transparently. diff --git a/doc/users/next_whats_new/multicursor_multifigure.rst b/doc/users/next_whats_new/multicursor_multifigure.rst deleted file mode 100644 index 04b39f9d0c56..000000000000 --- a/doc/users/next_whats_new/multicursor_multifigure.rst +++ /dev/null @@ -1,8 +0,0 @@ -``MultiCursor`` now supports Axes split over multiple figures -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -Previously, `.MultiCursor` only worked if all target Axes belonged to the same -figure. - -As a consequence of this change, the first argument to the `.MultiCursor` -constructor has become unused (it was previously the joint canvas of all Axes, -but the canvases are now directly inferred from the list of Axes). diff --git a/doc/users/next_whats_new/no_broken_streamlines.rst b/doc/users/next_whats_new/no_broken_streamlines.rst deleted file mode 100644 index 7160cd7caca0..000000000000 --- a/doc/users/next_whats_new/no_broken_streamlines.rst +++ /dev/null @@ -1,25 +0,0 @@ -Add option to plt.streamplot to not break streamlines ------------------------------------------------------ - -It is now possible to specify that streamplots have continuous, unbroken -streamlines. Previously streamlines would end to limit the number of lines -within a single grid cell. See the difference between the plots below: - -.. plot:: - - import matplotlib.pyplot as plt - import numpy as np - - w = 3 - Y, X = np.mgrid[-w:w:100j, -w:w:100j] - U = -1 - X**2 + Y - V = 1 + X - Y**2 - speed = np.sqrt(U**2 + V**2) - - fig, (ax0, ax1) = plt.subplots(1, 2, sharex=True) - - ax0.streamplot(X, Y, U, V, broken_streamlines=True) - ax0.set_title('broken_streamlines=True') - - ax1.streamplot(X, Y, U, V, broken_streamlines=False) - ax1.set_title('broken_streamlines=False') diff --git a/doc/users/next_whats_new/plt_xyticks_support_minor.rst b/doc/users/next_whats_new/plt_xyticks_support_minor.rst deleted file mode 100644 index fef2ce764113..000000000000 --- a/doc/users/next_whats_new/plt_xyticks_support_minor.rst +++ /dev/null @@ -1,15 +0,0 @@ -``plt.xticks`` and ``plt.yticks`` support *minor* keyword argument ------------------------------------------------------------------- - -It is now possible to set or get minor ticks using `.pyplot.xticks` and -`.pyplot.yticks` by setting ``minor=True``. - -.. plot:: - :include-source: true - - import matplotlib.pyplot as plt - plt.figure() - plt.plot([1, 2, 3, 3.5], [2, 1, 0, -0.5]) - plt.xticks([1, 2, 3], ["One", "Zwei", "Trois"]) - plt.xticks([1.414, 2.5, 3.142], - [r"$\sqrt{2}$", r"$\frac{5}{2}$", r"$\pi$"], minor=True) diff --git a/doc/users/next_whats_new/polygon_selector_box.rst b/doc/users/next_whats_new/polygon_selector_box.rst deleted file mode 100644 index 10116e6c75fb..000000000000 --- a/doc/users/next_whats_new/polygon_selector_box.rst +++ /dev/null @@ -1,6 +0,0 @@ -PolygonSelector bounding boxes ------------------------------- -`~matplotlib.widgets.PolygonSelector` now has a *draw_bounding_box* argument, which -when set to `True` will draw a bounding box around the polygon once it is -complete. The bounding box can be resized and moved, allowing the points of -the polygon to be easily resized. diff --git a/doc/users/next_whats_new/polygon_vert_setter.rst b/doc/users/next_whats_new/polygon_vert_setter.rst deleted file mode 100644 index 37dc442e79ea..000000000000 --- a/doc/users/next_whats_new/polygon_vert_setter.rst +++ /dev/null @@ -1,6 +0,0 @@ -Setting PolygonSelector vertices --------------------------------- -The vertices of `~matplotlib.widgets.PolygonSelector` can now be set -programmatically by using the `~matplotlib.widgets.PolygonSelector.verts` -property. Setting the vertices this way will reset the selector, and create -a new complete selector with the supplied vertices. diff --git a/doc/users/next_whats_new/rectangle_patch_rotation.rst b/doc/users/next_whats_new/rectangle_patch_rotation.rst deleted file mode 100644 index ba3c1b336604..000000000000 --- a/doc/users/next_whats_new/rectangle_patch_rotation.rst +++ /dev/null @@ -1,5 +0,0 @@ -Rectangle patch rotation point ------------------------------- - -The rotation point of the `~matplotlib.patches.Rectangle` can now be set to 'xy', -'center' or a 2-tuple of numbers. diff --git a/doc/users/next_whats_new/rename_ncol_keyword_in_legend.rst b/doc/users/next_whats_new/rename_ncol_keyword_in_legend.rst deleted file mode 100644 index 54db966bf8a9..000000000000 --- a/doc/users/next_whats_new/rename_ncol_keyword_in_legend.rst +++ /dev/null @@ -1,7 +0,0 @@ -``ncol`` keyword argument to ``legend`` renamed to ``ncols`` -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -The ``ncol`` keyword argument to `~.Axes.legend` for controlling the number of -columns is renamed to ``ncols`` for consistency with the ``ncols`` and -``nrows`` keywords of `~.Figure.subplots` and `~.GridSpec`. -``ncol`` is still supported though. diff --git a/doc/users/next_whats_new/resample_colormaps.rst b/doc/users/next_whats_new/resample_colormaps.rst deleted file mode 100644 index f2fbe4da4d83..000000000000 --- a/doc/users/next_whats_new/resample_colormaps.rst +++ /dev/null @@ -1,13 +0,0 @@ -Colormap method for creating a different lookup table size ----------------------------------------------------------- -The new method `.Colormap.resampled` creates a new `.Colormap` instance -with the specified lookup table size. This is a replacement for manipulating -the lookup table size via ``get_cmap``. - -Use:: - - get_cmap(name).resampled(N) - -instead of:: - - get_cmap(name, lut=N) diff --git a/doc/users/next_whats_new/selector_improvement.rst b/doc/users/next_whats_new/selector_improvement.rst deleted file mode 100644 index f19282335705..000000000000 --- a/doc/users/next_whats_new/selector_improvement.rst +++ /dev/null @@ -1,40 +0,0 @@ -Selectors improvement: rotation, aspect ratio correction and add/remove state ------------------------------------------------------------------------------ - -The `~matplotlib.widgets.RectangleSelector` and -`~matplotlib.widgets.EllipseSelector` can now be rotated interactively between --45° and 45°. The range limits are currently dictated by the implementation. -The rotation is enabled or disabled by striking the *r* key -('r' is the default key mapped to 'rotate' in *state_modifier_keys*) or by calling -``selector.add_state('rotate')``. - -The aspect ratio of the axes can now be taken into account when using the -"square" state. This is enabled by specifying ``use_data_coordinates='True'`` when -the selector is initialized. - -In addition to changing selector state interactively using the modifier keys -defined in *state_modifier_keys*, the selector state can now be changed -programmatically using the *add_state* and *remove_state* methods. - - -.. code-block:: python - - import matplotlib.pyplot as plt - from matplotlib.widgets import RectangleSelector - import numpy as np - - values = np.arange(0, 100) - - fig = plt.figure() - ax = fig.add_subplot() - ax.plot(values, values) - - selector = RectangleSelector(ax, print, interactive=True, - drag_from_anywhere=True, - use_data_coordinates=True) - selector.add_state('rotate') # alternatively press 'r' key - # rotate the selector interactively - - selector.remove_state('rotate') # alternatively press 'r' key - - selector.add_state('square') diff --git a/doc/users/next_whats_new/snap_selector.rst b/doc/users/next_whats_new/snap_selector.rst deleted file mode 100644 index 9ff0ccd87e0c..000000000000 --- a/doc/users/next_whats_new/snap_selector.rst +++ /dev/null @@ -1,4 +0,0 @@ -SpanSelector widget can now be snapped to specified values -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -The SpanSelector widget can now be snapped to values specified by the *snap_values* -argument. diff --git a/doc/users/next_whats_new/striped_lines.rst b/doc/users/next_whats_new/striped_lines.rst deleted file mode 100644 index dff1205a5db1..000000000000 --- a/doc/users/next_whats_new/striped_lines.rst +++ /dev/null @@ -1,19 +0,0 @@ -Striped lines (experimental) ----------------------------- - -New *gapcolor* parameter enables the creation of striped lines. - -.. plot:: - :include-source: true - - import matplotlib.pyplot as plt - import numpy as np - - x = np.linspace(1., 3., 10) - y = x**3 - - fig, ax = plt.subplots() - ax.plot(x, y, linestyle='--', color='orange', gapcolor='blue', - linewidth=3, label='a striped line') - ax.legend() - plt.show() diff --git a/doc/users/next_whats_new/strnorm.rst b/doc/users/next_whats_new/strnorm.rst deleted file mode 100644 index 42be191f2d55..000000000000 --- a/doc/users/next_whats_new/strnorm.rst +++ /dev/null @@ -1,6 +0,0 @@ -Setting norms with strings -~~~~~~~~~~~~~~~~~~~~~~~~~~ -Norms can now be set (e.g. on images) using the string name of the -corresponding scale, e.g. ``imshow(array, norm="log")``. Note that in that -case, it is permissible to also pass *vmin* and *vmax*, as a new Norm instance -will be created under the hood. diff --git a/doc/users/next_whats_new/url_active_areas_rotate.rst b/doc/users/next_whats_new/url_active_areas_rotate.rst deleted file mode 100644 index 6c6d29be86fa..000000000000 --- a/doc/users/next_whats_new/url_active_areas_rotate.rst +++ /dev/null @@ -1,5 +0,0 @@ -The active URL area rotates when link text is rotated -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -When link text is rotated in a matplotlib figure, the active URL -area will now include the link area. Previously, the active area -remained in the original, non-rotated, position. diff --git a/doc/users/next_whats_new/use_contourpy.rst b/doc/users/next_whats_new/use_contourpy.rst deleted file mode 100644 index 31be55804d1a..000000000000 --- a/doc/users/next_whats_new/use_contourpy.rst +++ /dev/null @@ -1,27 +0,0 @@ -New external dependency ContourPy used for quad contour calculations --------------------------------------------------------------------- - -Previously Matplotlib shipped its own C++ code for calculating the contours of -quad grids. Now the external library -`ContourPy `_ is used instead. There -is a choice of four algorithms to use, controlled by the *algorithm* keyword -argument to the functions `~matplotlib.axes.Axes.contour` and -`~matplotlib.axes.Axes.contourf`. The default behaviour is to use -``algorithm='mpl2014'`` which is the same algorithm that Matplotlib has been -using since 2014. - -See the `ContourPy documentation `_ for -further details of the different algorithms. - -.. note:: - - Contour lines and polygons produced by ``algorithm='mpl2014'`` will be the - same as those produced before this change to within floating-point - tolerance. The exception is for duplicate points, i.e. contours containing - adjacent (x, y) points that are identical; previously the duplicate points - were removed, now they are kept. Contours affected by this will produce the - same visual output, but there will be a greater number of points in the - contours. - - The locations of contour labels obtained by using - `~matplotlib.axes.Axes.clabel` may also be different. diff --git a/doc/users/next_whats_new/width_height_ratios.rst b/doc/users/next_whats_new/width_height_ratios.rst deleted file mode 100644 index 017c34a55cc4..000000000000 --- a/doc/users/next_whats_new/width_height_ratios.rst +++ /dev/null @@ -1,7 +0,0 @@ -``subplots``, ``subplot_mosaic`` accept *height_ratios* and *width_ratios* arguments ------------------------------------------------------------------------------------- - -The relative width and height of columns and rows in `~.Figure.subplots` and -`~.Figure.subplot_mosaic` can be controlled by passing *height_ratios* and -*width_ratios* keyword arguments to the methods. Previously, this required -passing the ratios in *gridspec_kws* arguments. diff --git a/doc/users/next_whats_new/windows_arm64.rst b/doc/users/next_whats_new/windows_arm64.rst deleted file mode 100644 index b649872ff2e5..000000000000 --- a/doc/users/next_whats_new/windows_arm64.rst +++ /dev/null @@ -1,8 +0,0 @@ -Windows on Arm support ----------------------- - -Preliminary support for windows on arm64 target added. - -Matplotlib for windows/arm64 requires FreeType 2.11 or above. - -No binary wheels are available yet but can be built from source. diff --git a/doc/users/prev_whats_new/whats_new_3.6.0.rst b/doc/users/prev_whats_new/whats_new_3.6.0.rst new file mode 100644 index 000000000000..38f7ced1f293 --- /dev/null +++ b/doc/users/prev_whats_new/whats_new_3.6.0.rst @@ -0,0 +1,534 @@ +============================== +What's new in Matplotlib 3.6.0 +============================== + +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 + +Figure and Axes creation / management +===================================== + +``subplots``, ``subplot_mosaic`` accept *height_ratios* and *width_ratios* arguments +------------------------------------------------------------------------------------ + +The relative width and height of columns and rows in `~.Figure.subplots` and +`~.Figure.subplot_mosaic` can be controlled by passing *height_ratios* and +*width_ratios* keyword arguments to the methods. Previously, this required +passing the ratios in *gridspec_kws* arguments. + +New ``layout_engine`` module +---------------------------- + +Matplotlib ships with ``tight_layout`` and ``constrained_layout`` layout +engines. A new `.layout_engine` module is provided to allow downstream +libraries to write their own layout engines and `~.figure.Figure` objects can +now take a `.LayoutEngine` subclass as an argument to the *layout* parameter. + +``Axes.inset_axes`` flexibility +------------------------------- + +`matplotlib.axes.Axes.inset_axes` now accepts the *projection*, *polar* and +*axes_class* keyword arguments, so that subclasses of `matplotlib.axes.Axes` +may be returned. + +Plotting methods +================ + +Striped lines (experimental) +---------------------------- + +The new *gapcolor* parameter to `~.Axes.plot` enables the creation of striped +lines. + +.. plot:: + :include-source: true + + x = np.linspace(1., 3., 10) + y = x**3 + + fig, ax = plt.subplots() + ax.plot(x, y, linestyle='--', color='orange', gapcolor='blue', + linewidth=3, label='a striped line') + ax.legend() + +Custom cap widths in box and whisker plots in ``bxp`` and ``boxplot`` +--------------------------------------------------------------------- + +The new *capwidths* parameter to `~.Axes.bxp` and `~.Axes.boxplot` allows +controlling the widths of the caps in box and whisker plots. + +.. plot:: + :include-source: true + + x = np.linspace(-7, 7, 140) + x = np.hstack([-25, x, 25]) + fig, ax = plt.subplots() + ax.boxplot([x, x], notch=True, capwidths=[0.01, 0.2]) + +Easier labelling of bars in bar plot +------------------------------------ + +The *label* argument of `~.Axes.bar` can now be passed a list of labels for the +bars. + +.. code-block:: python + + x = ["a", "b", "c"] + y = [10, 20, 15] + + fig, ax = plt.subplots() + bar_container = ax.barh(x, y, label=x) + [bar.get_label() for bar in bar_container] + +New external dependency ContourPy used for quad contour calculations +-------------------------------------------------------------------- + +Previously Matplotlib shipped its own C++ code for calculating the contours of +quad grids. Now the external library `ContourPy +`_ is used instead. There is a choice +of four algorithms to use, controlled by the *algorithm* keyword argument to +the functions `~.axes.Axes.contour` and `~.axes.Axes.contourf`. The default +behaviour is to use ``algorithm='mpl2014'`` which is the same algorithm that +Matplotlib has been using since 2014. + +See the `ContourPy documentation `_ for +further details of the different algorithms. + +.. note:: + + Contour lines and polygons produced by ``algorithm='mpl2014'`` will be the + same as those produced before this change to within floating-point + tolerance. The exception is for duplicate points, i.e. contours containing + adjacent (x, y) points that are identical; previously the duplicate points + were removed, now they are kept. Contours affected by this will produce the + same visual output, but there will be a greater number of points in the + contours. + + The locations of contour labels obtained by using `~.axes.Axes.clabel` may + also be different. + +``streamplot`` can disable streamline breaks +-------------------------------------------- + +It is now possible to specify that streamplots have continuous, unbroken +streamlines. Previously streamlines would end to limit the number of lines +within a single grid cell. See the difference between the plots below: + +.. plot:: + + w = 3 + Y, X = np.mgrid[-w:w:100j, -w:w:100j] + U = -1 - X**2 + Y + V = 1 + X - Y**2 + speed = np.sqrt(U**2 + V**2) + + fig, (ax0, ax1) = plt.subplots(1, 2, sharex=True) + + ax0.streamplot(X, Y, U, V, broken_streamlines=True) + ax0.set_title('broken_streamlines=True') + + ax1.streamplot(X, Y, U, V, broken_streamlines=False) + ax1.set_title('broken_streamlines=False') + +New axis scale ``asinh`` (experimental) +--------------------------------------- + +The new ``asinh`` axis scale offers an alternative to ``symlog`` that smoothly +transitions between the quasi-linear and asymptotically logarithmic regions of +the scale. This is based on an arcsinh transformation that allows plotting both +positive and negative values that span many orders of magnitude. + +.. plot:: + + fig, (ax0, ax1) = plt.subplots(1, 2, sharex=True) + x = np.linspace(-3, 6, 100) + + ax0.plot(x, x) + ax0.set_yscale('symlog') + ax0.grid() + ax0.set_title('symlog') + + ax1.plot(x, x) + ax1.set_yscale('asinh') + ax1.grid() + ax1.set_title(r'$sinh^{-1}$') + + for p in (-2, 2): + for ax in (ax0, ax1): + c = plt.Circle((p, p), radius=0.5, fill=False, + color='red', alpha=0.8, lw=3) + ax.add_patch(c) + +``stairs(..., fill=True)`` hides patch edge by setting linewidth +---------------------------------------------------------------- + +``stairs(..., fill=True)`` would previously hide Patch edges by setting +``edgecolor="none"``. Consequently, calling ``set_color()`` on the Patch later +would make the Patch appear larger. + +Now, by using ``linewidth=0``, this apparent size change is prevented. Likewise +calling ``stairs(..., fill=True, linewidth=3)`` will behave more transparently. + +Fix the dash offset of the Patch class +-------------------------------------- + +Formerly, when setting the line style on a `.Patch` object using a dash tuple, +the offset was ignored. Now the offset is applied to the Patch as expected and +it can be used as it is used with `.Line2D` objects. + +Rectangle patch rotation point +------------------------------ + +The rotation point of the `~matplotlib.patches.Rectangle` can now be set to +'xy', 'center' or a 2-tuple of numbers. + +Colors and colormaps +==================== + +Colormap method for creating a different lookup table size +---------------------------------------------------------- + +The new method `.Colormap.resampled` creates a new `.Colormap` instance +with the specified lookup table size. This is a replacement for manipulating +the lookup table size via ``get_cmap``. + +Use:: + + get_cmap(name).resampled(N) + +instead of:: + + get_cmap(name, lut=N) + +Setting norms with strings +-------------------------- + +Norms can now be set (e.g. on images) using the string name of the +corresponding scale, e.g. ``imshow(array, norm="log")``. Note that in that +case, it is permissible to also pass *vmin* and *vmax*, as a new Norm instance +will be created under the hood. + +Titles, ticks, and labels +========================= + +``plt.xticks`` and ``plt.yticks`` support *minor* keyword argument +------------------------------------------------------------------ + +It is now possible to set or get minor ticks using `.pyplot.xticks` and +`.pyplot.yticks` by setting ``minor=True``. + +.. plot:: + :include-source: true + + plt.figure() + plt.plot([1, 2, 3, 3.5], [2, 1, 0, -0.5]) + plt.xticks([1, 2, 3], ["One", "Zwei", "Trois"]) + plt.xticks([1.414, 2.5, 3.142], + [r"$\sqrt{2}$", r"$\frac{5}{2}$", r"$\pi$"], minor=True) + +Legends +======= + +Legend can control alignment of title and handles +------------------------------------------------- + +`.Legend` now supports controlling the alignment of the title and handles via +the keyword argument *alignment*. You can also use `.Legend.set_alignment` to +control the alignment on existing Legends. + +*ncol* keyword argument to ``legend`` renamed to *ncols* +-------------------------------------------------------- + +The *ncol* keyword argument to `~.Axes.legend` for controlling the number of +columns is renamed to *ncols* for consistency with the *ncols* and *nrows* +keywords of `~.Figure.subplots` and `~.GridSpec`. *ncol* remains supported for +backwards compatibility, but is discouraged. + +Markers +======= + +``marker`` can now be set to the string "none" +---------------------------------------------- + +The string "none" means *no-marker*, consistent with other APIs which support +the lowercase version. Using "none" is recommended over using "None", to avoid +confusion with the None object. + +Customization of ``MarkerStyle`` join and cap style +--------------------------------------------------- + +New `.MarkerStyle` parameters allow control of join style and cap style, and +for the user to supply a transformation to be applied to the marker (e.g. a +rotation). + +.. plot:: + :include-source: true + + from matplotlib.markers import MarkerStyle + from matplotlib.transforms import Affine2D + fig, ax = plt.subplots(figsize=(6, 1)) + fig.suptitle('New markers', fontsize=14) + for col, (size, rot) in enumerate(zip([2, 5, 10], [0, 45, 90])): + t = Affine2D().rotate_deg(rot).scale(size) + ax.plot(col, 0, marker=MarkerStyle("*", transform=t)) + ax.axis("off") + ax.set_xlim(-0.1, 2.4) + +Fonts and Text +============== + +Font fallback +------------- + +It is now possible to specify a list of fonts families and Matplotlib will try +them in order to locate a required glyph. + +.. plot:: + :caption: Demonstration of mixed English and Chinese text with font fallback. + :alt: The phrase "There are 几个汉字 in between!" rendered in various fonts. + :include-source: True + + text = "There are 几个汉字 in between!" + + plt.rcParams["font.size"] = 20 + fig = plt.figure(figsize=(4.75, 1.85)) + fig.text(0.05, 0.85, text, family=["WenQuanYi Zen Hei"]) + fig.text(0.05, 0.65, text, family=["Noto Sans CJK JP"]) + fig.text(0.05, 0.45, text, family=["DejaVu Sans", "Noto Sans CJK JP"]) + fig.text(0.05, 0.25, text, family=["DejaVu Sans", "WenQuanYi Zen Hei"]) + +This currently works with the Agg (and all of the GUI embeddings), svg, pdf, +ps, and inline backends. + +List of available font names +---------------------------- + +The list of available fonts are now easily accessible. To get a list of the +available font names in Matplotlib use: + +.. code-block:: python + + from matplotlib import font_manager + font_manager.get_font_names() + +``math_to_image`` now has a *color* keyword argument +---------------------------------------------------- + +To easily support external libraries that rely on the MathText rendering of +Matplotlib to generate equation images, a *color* keyword argument was added to +`~matplotlib.mathtext.math_to_image`. + +.. code-block:: python + + from matplotlib import mathtext + mathtext.math_to_image('$x^2$', 'filename.png', color='Maroon') + +Active URL area rotates with link text +-------------------------------------- + +When link text is rotated in a figure, the active URL area will now include the +rotated link area. Previously, the active area remained in the original, +non-rotated, position. + +rcParams improvements +===================== + +Allow setting figure label size and weight globally and separately from title +----------------------------------------------------------------------------- + +For figure labels, ``Figure.supxlabel`` and ``Figure.supylabel``, the size and +weight can be set separately from the figure title using :rc:`figure.labelsize` +and :rc:`figure.labelweight`. + +Note that if you have changed :rc:`figure.titlesize` or +:rc:`figure.titleweight`, you must now also change the introduced parameters +for a result consistent with past behaviour. + +Double-quoted strings in matplotlibrc +------------------------------------- + +You can now use double-quotes around strings. This allows using the '#' +character in strings. Without quotes, '#' is interpreted as start of a comment. +In particular, you can now define hex-colors: + +.. code-block:: none + + grid.color: "#b0b0b0" + +3D Axes improvements +==================== + +Custom focal length for 3D camera +--------------------------------- + +The 3D Axes can now better mimic real-world cameras by specifying the focal +length of the virtual camera. The default focal length of 1 corresponds to a +Field of View (FOV) of 90°, and is backwards-compatible with existing 3D plots. +An increased focal length between 1 and infinity "flattens" the image, while a +decreased focal length between 1 and 0 exaggerates the perspective and gives +the image more apparent depth. + +The focal length can be calculated from a desired FOV via the equation: + +.. mathmpl:: + + focal\_length = 1/\tan(FOV/2) + +.. plot:: + :include-source: true + + from mpl_toolkits.mplot3d import axes3d + + fig, axs = plt.subplots(1, 3, subplot_kw={'projection': '3d'}) + X, Y, Z = axes3d.get_test_data(0.05) + focal_lengths = [0.2, 1, np.inf] + for ax, fl in zip(axs, focal_lengths): + ax.plot_wireframe(X, Y, Z, rstride=10, cstride=10) + ax.set_proj_type('persp', focal_length=fl) + ax.set_title(f"focal_length = {fl}") + fig.set_size_inches(10, 4) + +3D plots gained a 3rd "roll" viewing angle +------------------------------------------ + +3D plots can now be viewed from any orientation with the addition of a 3rd roll +angle, which rotates the plot about the viewing axis. Interactive rotation +using the mouse still only controls elevation and azimuth, meaning that this +feature is relevant to users who create more complex camera angles +programmatically. The default roll angle of 0 is backwards-compatible with +existing 3D plots. + +.. plot:: + :include-source: true + + from mpl_toolkits.mplot3d import axes3d + fig = plt.figure() + ax = fig.add_subplot(projection='3d') + X, Y, Z = axes3d.get_test_data(0.05) + ax.plot_wireframe(X, Y, Z, rstride=10, cstride=10) + ax.view_init(elev=0, azim=0, roll=30) + ax.set_title('elev=0, azim=0, roll=30') + +Equal aspect ratio for 3D plots +------------------------------- + +Users can set the aspect ratio for the X, Y, Z axes of a 3D plot to be 'equal', +'equalxy', 'equalxz', or 'equalyz' rather than the default of 'auto'. + +.. plot:: + :include-source: true + + from itertools import combinations, product + + aspects = ('auto', 'equal', 'equalxy', 'equalyz', 'equalxz') + fig, axs = plt.subplots(1, len(aspects), subplot_kw={'projection': '3d'}) + + # Draw rectangular cuboid with side lengths [1, 1, 5] + r = [0, 1] + scale = np.array([1, 1, 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_box_aspect((3, 4, 5)) + ax.set_aspect(aspects[i]) + ax.set_title(f"set_aspect('{aspects[i]}')") + + fig.set_size_inches(13, 3) + +Interactive tool improvements +============================= + +Rotation, aspect ratio correction and add/remove state +------------------------------------------------------ + +The `.RectangleSelector` and `.EllipseSelector` can now be rotated +interactively between -45° and 45°. The range limits are currently dictated by +the implementation. The rotation is enabled or disabled by striking the *r* key +('r' is the default key mapped to 'rotate' in *state_modifier_keys*) or by +calling ``selector.add_state('rotate')``. + +The aspect ratio of the axes can now be taken into account when using the +"square" state. This is enabled by specifying ``use_data_coordinates='True'`` +when the selector is initialized. + +In addition to changing selector state interactively using the modifier keys +defined in *state_modifier_keys*, the selector state can now be changed +programmatically using the *add_state* and *remove_state* methods. + +.. code-block:: python + + from matplotlib.widgets import RectangleSelector + + values = np.arange(0, 100) + + fig = plt.figure() + ax = fig.add_subplot() + ax.plot(values, values) + + selector = RectangleSelector(ax, print, interactive=True, + drag_from_anywhere=True, + use_data_coordinates=True) + selector.add_state('rotate') # alternatively press 'r' key + # rotate the selector interactively + + selector.remove_state('rotate') # alternatively press 'r' key + + selector.add_state('square') + +``MultiCursor`` now supports Axes split over multiple figures +------------------------------------------------------------- + +Previously, `.MultiCursor` only worked if all target Axes belonged to the same +figure. + +As a consequence of this change, the first argument to the `.MultiCursor` +constructor has become unused (it was previously the joint canvas of all Axes, +but the canvases are now directly inferred from the list of Axes). + +``PolygonSelector`` bounding boxes +---------------------------------- + +`.PolygonSelector` now has a *draw_bounding_box* argument, which when set to +`True` will draw a bounding box around the polygon once it is complete. The +bounding box can be resized and moved, allowing the points of the polygon to be +easily resized. + +Setting ``PolygonSelector`` vertices +------------------------------------ + +The vertices of `.PolygonSelector` can now be set programmatically by using the +`.PolygonSelector.verts` property. Setting the vertices this way will reset the +selector, and create a new complete selector with the supplied vertices. + +``SpanSelector`` widget can now be snapped to specified values +-------------------------------------------------------------- + +The `.SpanSelector` widget can now be snapped to values specified by the +*snap_values* argument. + +Platform-specific changes +========================= + +New minimum macOS version +------------------------- + +The macosx backend now requires macOS >= 10.12. + +Windows on ARM support +---------------------- + +Preliminary support for Windows on arm64 target has been added. This support +requires FreeType 2.11 or above. + +No binary wheels are available yet but it may be built from source. diff --git a/doc/users/release_notes.rst b/doc/users/release_notes.rst index f0fbd5a32de0..40c286e06a84 100644 --- a/doc/users/release_notes.rst +++ b/doc/users/release_notes.rst @@ -7,13 +7,14 @@ Release notes ============= .. include from another document so that it's easy to exclude this for releases -.. include:: release_notes_next.rst +.. include: release_notes_next.rst Version 3.6 =========== .. toctree:: :maxdepth: 1 + prev_whats_new/whats_new_3.6.0.rst ../api/prev_api_changes/api_changes_3.6.0.rst github_stats.rst @@ -27,7 +28,7 @@ Version 3.5 ../api/prev_api_changes/api_changes_3.5.3.rst ../api/prev_api_changes/api_changes_3.5.2.rst ../api/prev_api_changes/api_changes_3.5.0.rst - github_stats.rst + prev_whats_new/github_stats_3.5.3.rst prev_whats_new/github_stats_3.5.2.rst prev_whats_new/github_stats_3.5.1.rst prev_whats_new/github_stats_3.5.0.rst From 6b57bca7b4dcd37056fe633deaef4f298729cdd4 Mon Sep 17 00:00:00 2001 From: Elliott Sales de Andrade Date: Sat, 10 Sep 2022 05:29:41 -0400 Subject: [PATCH 6/8] Add additional 3.6 What's new entries --- doc/users/prev_whats_new/whats_new_3.6.0.rst | 160 ++++++++++++++++++- 1 file changed, 158 insertions(+), 2 deletions(-) diff --git a/doc/users/prev_whats_new/whats_new_3.6.0.rst b/doc/users/prev_whats_new/whats_new_3.6.0.rst index 38f7ced1f293..da6cbfda606b 100644 --- a/doc/users/prev_whats_new/whats_new_3.6.0.rst +++ b/doc/users/prev_whats_new/whats_new_3.6.0.rst @@ -22,6 +22,13 @@ The relative width and height of columns and rows in `~.Figure.subplots` and *width_ratios* keyword arguments to the methods. Previously, this required passing the ratios in *gridspec_kws* arguments. +Constrained layout is no longer considered experimental +------------------------------------------------------- + +The constrained layout engine and API is no longer considered experimental. +Arbitrary changes to behaviour and API are no longer permitted without a +deprecation period. + New ``layout_engine`` module ---------------------------- @@ -30,6 +37,26 @@ engines. A new `.layout_engine` module is provided to allow downstream libraries to write their own layout engines and `~.figure.Figure` objects can now take a `.LayoutEngine` subclass as an argument to the *layout* parameter. +Compressed layout for fixed-aspect ratio Axes +--------------------------------------------- + +Simple arrangements of Axes with fixed aspect ratios can now be packed together +with ``fig, axs = plt.subplots(2, 3, layout='compressed')``. With +``layout='tight'`` or ``'constrained'``, Axes with a fixed aspect ratio can +leave large gaps between each other. Using the ``layout='compressed'`` layout +reduces the space between the Axes, and adds the extra space to the outer +margins. See :ref:`compressed_layout`. + +Layout engines may now be removed +--------------------------------- + +The layout engine on a Figure may now be removed by calling +`.Figure.set_layout_engine` with ``'none'``. This may be useful after computing +layout in order to reduce computations, e.g., for subsequent animation loops. + +A different layout engine may be set afterwards, so long as it is compatible +with the previous layout engine. + ``Axes.inset_axes`` flexibility ------------------------------- @@ -37,6 +64,38 @@ now take a `.LayoutEngine` subclass as an argument to the *layout* parameter. *axes_class* keyword arguments, so that subclasses of `matplotlib.axes.Axes` may be returned. +WebP is now a supported output format +------------------------------------- + +Figures may now be saved in WebP format by using the ``.webp`` file extension, +or passing ``format='webp'`` to `~.Figure.savefig`. This relies on `Pillow +`_ support for WebP. + +Garbage collection is no longer run on figure close +--------------------------------------------------- + +Matplotlib has a large number of circular references (between Figure and +Manager, between Axes and Figure, Axes and Artist, Figure and Canvas, etc.) so +when the user drops their last reference to a Figure (and clears it from +pyplot's state), the objects will not immediately be deleted. + +To account for this we have long (since before 2004) had a `gc.collect` (of the +lowest two generations only) in the closing code in order to promptly clean up +after ourselves. However this is both not doing what we want (as most of our +objects will actually survive) and due to clearing out the first generation +opened us up to having unbounded memory usage. + +In cases with a very tight loop between creating the figure and destroying it +(e.g. ``plt.figure(); plt.close()``) the first generation will never grow large +enough for Python to consider running the collection on the higher generations. +This will lead to unbounded memory usage as the long-lived objects are never +re-considered to look for reference cycles and hence are never deleted. + +We now no longer do any garbage collection when a figure is closed, and rely on +Python automatically deciding to run garbage collection periodically. If you +have strict memory requirements, you can call `gc.collect` yourself but this +may have performance impacts in a tight computation loop. + Plotting methods ================ @@ -86,8 +145,21 @@ bars. bar_container = ax.barh(x, y, label=x) [bar.get_label() for bar in bar_container] -New external dependency ContourPy used for quad contour calculations --------------------------------------------------------------------- +New style format string for colorbar ticks +------------------------------------------ + +The *format* argument of `~.Figure.colorbar` (and other colorbar methods) now +accepts ``{}``-style format strings. + +Linestyles for negative contours may be set individually +-------------------------------------------------------- + +The line style of negative contours may be set by passing the +*negative_linestyles* argument to `.Axes.contour`. Previously, this style could +only be set globally via :rc:`contour.negative_linestyles`. + +ContourPy used for quad contour calculations +-------------------------------------------- Previously Matplotlib shipped its own C++ code for calculating the contours of quad grids. Now the external library `ContourPy @@ -113,6 +185,14 @@ further details of the different algorithms. The locations of contour labels obtained by using `~.axes.Axes.clabel` may also be different. +``errorbar`` supports *markerfacecoloralt* +------------------------------------------ + +The *markerfacecoloralt* parameter is now passed to the line plotter from +`.Axes.errorbar`. The documentation now accurately lists which properties are +passed to `.Line2D`, rather than claiming that all keyword arguments are passed +on. + ``streamplot`` can disable streamline breaks -------------------------------------------- @@ -191,6 +271,14 @@ The rotation point of the `~matplotlib.patches.Rectangle` can now be set to Colors and colormaps ==================== +Color sequence registry +----------------------- + +The color sequence registry, `.ColorSequenceRegistry`, contains sequences +(i.e., simple lists) of colors that are known to Matplotlib by name. This will +not normally be used directly, but through the universal instance at +`matplotlib.color_sequences`. + Colormap method for creating a different lookup table size ---------------------------------------------------------- @@ -350,6 +438,12 @@ Note that if you have changed :rc:`figure.titlesize` or :rc:`figure.titleweight`, you must now also change the introduced parameters for a result consistent with past behaviour. +Mathtext parsing can be disabled globally +----------------------------------------- + +The :rc:`text.parse_math` setting may be used to disable parsing of mathtext in +all `.Text` objects (most notably from the `.Axes.text` method). + Double-quoted strings in matplotlibrc ------------------------------------- @@ -364,6 +458,14 @@ In particular, you can now define hex-colors: 3D Axes improvements ==================== +Standardized views for primary plane viewing angles +--------------------------------------------------- + +When viewing a 3D plot in one of the primary view planes (i.e., perpendicular +to the XY, XZ, or YZ planes), the Axis will be displayed in a standard +location. For further information on 3D views, see +:ref:`toolkit_mplot3d-view-angles` and :doc:`/gallery/mplot3d/view_planes_3d`. + Custom focal length for 3D camera --------------------------------- @@ -517,9 +619,63 @@ selector, and create a new complete selector with the supplied vertices. The `.SpanSelector` widget can now be snapped to values specified by the *snap_values* argument. +More toolbar icons are styled for dark themes +--------------------------------------------- + +On the macOS and Tk backends, toolbar icons will now be inverted when using a +dark theme. + Platform-specific changes ========================= +Wx backend uses standard toolbar +-------------------------------- + +Instead of a custom sizer, the toolbar is set on Wx windows as a standard +toolbar. + +Improvements to macosx backend +------------------------------ + +Modifier keys handled more consistently +....................................... + +The macosx backend now handles modifier keys in a manner more consistent with +other backends. See the table in :ref:`event-connections` for further +information. + +``savefig.directory`` rcParam support +..................................... + +The macosx backend will now obey the :rc:`savefig.directory` setting. If set to +a non-empty string, then the save dialog will default to this directory, and +preserve subsequent save directories as they are changed. + +``figure.raise_window`` rcParam support +....................................... + +The macosx backend will now obey the :rc:`figure.raise_window` setting. If set +to False, figure windows will not be raised to the top on update. + +Full-screen toggle support +.......................... + +As supported on other backends, the macosx backend now supports toggling +fullscreen view. By default, this view can be toggled by pressing the :kbd:`f` +key. + +Improved animation and blitting support +....................................... + +The macosx backend has been improved to fix blitting, animation frames with new +artists, and to reduce unnecessary draw calls. + +macOS application icon applied on Qt backend +-------------------------------------------- + +When using the Qt-based backends on macOS, the application icon will now be +set, as is done on other backends/platforms. + New minimum macOS version ------------------------- From cbf990dc6d9f3f6043ae97ff8e28b5c3ebaec4bd Mon Sep 17 00:00:00 2001 From: Elliott Sales de Andrade Date: Thu, 15 Sep 2022 03:32:00 -0400 Subject: [PATCH 7/8] DOC: Add additional plots to 3.6 What's new --- doc/users/prev_whats_new/whats_new_3.6.0.rst | 259 ++++++++++++++++--- 1 file changed, 219 insertions(+), 40 deletions(-) diff --git a/doc/users/prev_whats_new/whats_new_3.6.0.rst b/doc/users/prev_whats_new/whats_new_3.6.0.rst index da6cbfda606b..50cf414852fe 100644 --- a/doc/users/prev_whats_new/whats_new_3.6.0.rst +++ b/doc/users/prev_whats_new/whats_new_3.6.0.rst @@ -19,8 +19,19 @@ Figure and Axes creation / management The relative width and height of columns and rows in `~.Figure.subplots` and `~.Figure.subplot_mosaic` can be controlled by passing *height_ratios* and -*width_ratios* keyword arguments to the methods. Previously, this required -passing the ratios in *gridspec_kws* arguments. +*width_ratios* keyword arguments to the methods: + +.. plot:: + :include-source: true + + fig = plt.figure() + axs = fig.subplots(3, 1, sharex=True, height_ratios=[3, 1, 1]) + +Previously, this required passing the ratios in *gridspec_kw* arguments:: + + fig = plt.figure() + axs = fig.subplots(3, 1, sharex=True, + gridspec_kw=dict(height_ratios=[3, 1, 1])) Constrained layout is no longer considered experimental ------------------------------------------------------- @@ -41,11 +52,31 @@ Compressed layout for fixed-aspect ratio Axes --------------------------------------------- Simple arrangements of Axes with fixed aspect ratios can now be packed together -with ``fig, axs = plt.subplots(2, 3, layout='compressed')``. With -``layout='tight'`` or ``'constrained'``, Axes with a fixed aspect ratio can -leave large gaps between each other. Using the ``layout='compressed'`` layout -reduces the space between the Axes, and adds the extra space to the outer -margins. See :ref:`compressed_layout`. +with ``fig, axs = plt.subplots(2, 3, layout='compressed')``. + +With ``layout='tight'`` or ``'constrained'``, Axes with a fixed aspect ratio +can leave large gaps between each other: + +.. plot:: + + fig, axs = plt.subplots(2, 2, figsize=(5, 3), + sharex=True, sharey=True, layout="constrained") + for ax in axs.flat: + ax.imshow([[0, 1], [2, 3]]) + fig.suptitle("fixed-aspect plots, layout='constrained'") + +Using the ``layout='compressed'`` layout reduces the space between the Axes, +and adds the extra space to the outer margins: + +.. plot:: + + fig, axs = plt.subplots(2, 2, figsize=(5, 3), + sharex=True, sharey=True, layout='compressed') + for ax in axs.flat: + ax.imshow([[0, 1], [2, 3]]) + fig.suptitle("fixed-aspect plots, layout='compressed'") + +See :ref:`compressed_layout` for further details. Layout engines may now be removed --------------------------------- @@ -64,6 +95,16 @@ with the previous layout engine. *axes_class* keyword arguments, so that subclasses of `matplotlib.axes.Axes` may be returned. +.. plot:: + :include-source: true + + fig, ax = plt.subplots() + + ax.plot([0, 2], [1, 2]) + + polar_ax = ax.inset_axes([0.75, 0.25, 0.2, 0.2], projection='polar') + polar_ax.plot([0, 2], [1, 2]) + WebP is now a supported output format ------------------------------------- @@ -127,23 +168,31 @@ controlling the widths of the caps in box and whisker plots. x = np.linspace(-7, 7, 140) x = np.hstack([-25, x, 25]) + capwidths = [0.01, 0.2] + fig, ax = plt.subplots() - ax.boxplot([x, x], notch=True, capwidths=[0.01, 0.2]) + ax.boxplot([x, x], notch=True, capwidths=capwidths) + ax.set_title(f'{capwidths=}') Easier labelling of bars in bar plot ------------------------------------ -The *label* argument of `~.Axes.bar` can now be passed a list of labels for the -bars. +The *label* argument of `~.Axes.bar` and `~.Axes.barh` can now be passed a list +of labels for the bars. The list must be the same length as *x* and labels the +individual bars. Repeated labels are not de-duplicated and will cause repeated +label entries, so this is best used when bars also differ in style (e.g., by +passing a list to *color*, as below.) -.. code-block:: python +.. plot:: + :include-source: true x = ["a", "b", "c"] y = [10, 20, 15] + color = ['C0', 'C1', 'C2'] fig, ax = plt.subplots() - bar_container = ax.barh(x, y, label=x) - [bar.get_label() for bar in bar_container] + ax.bar(x, y, color=color, label=x) + ax.legend() New style format string for colorbar ticks ------------------------------------------ @@ -151,6 +200,12 @@ New style format string for colorbar ticks The *format* argument of `~.Figure.colorbar` (and other colorbar methods) now accepts ``{}``-style format strings. +.. code-block:: python + + fig, ax = plt.subplots() + im = ax.imshow(z) + fig.colorbar(im, format='{x:.2e}') # Instead of '%.2e' + Linestyles for negative contours may be set individually -------------------------------------------------------- @@ -158,6 +213,27 @@ The line style of negative contours may be set by passing the *negative_linestyles* argument to `.Axes.contour`. Previously, this style could only be set globally via :rc:`contour.negative_linestyles`. +.. plot:: + :include-source: true + + delta = 0.025 + x = np.arange(-3.0, 3.0, delta) + y = np.arange(-2.0, 2.0, delta) + X, Y = np.meshgrid(x, y) + Z1 = np.exp(-X**2 - Y**2) + Z2 = np.exp(-(X - 1)**2 - (Y - 1)**2) + Z = (Z1 - Z2) * 2 + + fig, axs = plt.subplots(1, 2) + + CS = axs[0].contour(X, Y, Z, 6, colors='k') + axs[0].clabel(CS, fontsize=9, inline=True) + axs[0].set_title('Default negative contours') + + CS = axs[1].contour(X, Y, Z, 6, colors='k', negative_linestyles='dotted') + axs[1].clabel(CS, fontsize=9, inline=True) + axs[1].set_title('Dotted negative contours') + ContourPy used for quad contour calculations -------------------------------------------- @@ -193,6 +269,19 @@ The *markerfacecoloralt* parameter is now passed to the line plotter from passed to `.Line2D`, rather than claiming that all keyword arguments are passed on. +.. plot:: + :include-source: true + + x = np.arange(0.1, 4, 0.5) + y = np.exp(-x) + + fig, ax = plt.subplots() + ax.errorbar(x, y, xerr=0.2, yerr=0.4, + linestyle=':', color='darkgrey', + marker='o', markersize=20, fillstyle='left', + markerfacecolor='tab:blue', markerfacecoloralt='tab:orange', + markeredgecolor='tab:brown', markeredgewidth=2) + ``streamplot`` can disable streamline breaks -------------------------------------------- @@ -266,7 +355,40 @@ Rectangle patch rotation point ------------------------------ The rotation point of the `~matplotlib.patches.Rectangle` can now be set to -'xy', 'center' or a 2-tuple of numbers. +'xy', 'center' or a 2-tuple of numbers using the *rotation_point* argument. + +.. plot:: + + fig, ax = plt.subplots() + + rect = plt.Rectangle((0, 0), 1, 1, facecolor='none', edgecolor='C0') + ax.add_patch(rect) + ax.annotate('Unrotated', (1, 0), color='C0', + horizontalalignment='right', verticalalignment='top', + xytext=(0, -3), textcoords='offset points') + + for rotation_point, color in zip(['xy', 'center', (0.75, 0.25)], + ['C1', 'C2', 'C3']): + ax.add_patch( + plt.Rectangle((0, 0), 1, 1, facecolor='none', edgecolor=color, + angle=45, rotation_point=rotation_point)) + + if rotation_point == 'center': + point = 0.5, 0.5 + elif rotation_point == 'xy': + point = 0, 0 + else: + point = rotation_point + ax.plot(point[:1], point[1:], color=color, marker='o') + + label = f'{rotation_point}' + if label == 'xy': + label += ' (default)' + ax.annotate(label, point, color=color, + xytext=(3, 3), textcoords='offset points') + + ax.set_aspect(1) + ax.set_title('rotation_point options') Colors and colormaps ==================== @@ -317,7 +439,7 @@ It is now possible to set or get minor ticks using `.pyplot.xticks` and plt.figure() plt.plot([1, 2, 3, 3.5], [2, 1, 0, -0.5]) plt.xticks([1, 2, 3], ["One", "Zwei", "Trois"]) - plt.xticks([1.414, 2.5, 3.142], + plt.xticks([np.sqrt(2), 2.5, np.pi], [r"$\sqrt{2}$", r"$\frac{5}{2}$", r"$\pi$"], minor=True) Legends @@ -330,6 +452,14 @@ Legend can control alignment of title and handles the keyword argument *alignment*. You can also use `.Legend.set_alignment` to control the alignment on existing Legends. +.. plot:: + :include-source: true + + fig, axs = plt.subplots(3, 1) + for i, alignment in enumerate(['left', 'center', 'right']): + axs[i].plot(range(10), label='test') + axs[i].legend(title=f'{alignment=}', alignment=alignment) + *ncol* keyword argument to ``legend`` renamed to *ncols* -------------------------------------------------------- @@ -358,15 +488,40 @@ rotation). .. plot:: :include-source: true - from matplotlib.markers import MarkerStyle + from matplotlib.markers import CapStyle, JoinStyle, MarkerStyle from matplotlib.transforms import Affine2D - fig, ax = plt.subplots(figsize=(6, 1)) - fig.suptitle('New markers', fontsize=14) - for col, (size, rot) in enumerate(zip([2, 5, 10], [0, 45, 90])): + + fig, axs = plt.subplots(3, 1, layout='constrained') + for ax in axs: + ax.axis('off') + ax.set_xlim(-0.5, 2.5) + + axs[0].set_title('Cap styles', fontsize=14) + for col, cap in enumerate(CapStyle): + axs[0].plot(col, 0, markersize=32, markeredgewidth=8, + marker=MarkerStyle('1', capstyle=cap)) + # Show the marker edge for comparison with the cap. + axs[0].plot(col, 0, markersize=32, markeredgewidth=1, + markerfacecolor='none', markeredgecolor='lightgrey', + marker=MarkerStyle('1')) + axs[0].annotate(cap.name, (col, 0), + xytext=(20, -5), textcoords='offset points') + + axs[1].set_title('Join styles', fontsize=14) + for col, join in enumerate(JoinStyle): + axs[1].plot(col, 0, markersize=32, markeredgewidth=8, + marker=MarkerStyle('*', joinstyle=join)) + # Show the marker edge for comparison with the join. + axs[1].plot(col, 0, markersize=32, markeredgewidth=1, + markerfacecolor='none', markeredgecolor='lightgrey', + marker=MarkerStyle('*')) + axs[1].annotate(join.name, (col, 0), + xytext=(20, -5), textcoords='offset points') + + axs[2].set_title('Arbitrary transforms', fontsize=14) + for col, (size, rot) in enumerate(zip([2, 5, 7], [0, 45, 90])): t = Affine2D().rotate_deg(rot).scale(size) - ax.plot(col, 0, marker=MarkerStyle("*", transform=t)) - ax.axis("off") - ax.set_xlim(-0.1, 2.4) + axs[2].plot(col, 0, marker=MarkerStyle('*', transform=t)) Fonts and Text ============== @@ -382,10 +537,10 @@ them in order to locate a required glyph. :alt: The phrase "There are 几个汉字 in between!" rendered in various fonts. :include-source: True - text = "There are 几个汉字 in between!" - plt.rcParams["font.size"] = 20 fig = plt.figure(figsize=(4.75, 1.85)) + + text = "There are 几个汉字 in between!" fig.text(0.05, 0.85, text, family=["WenQuanYi Zen Hei"]) fig.text(0.05, 0.65, text, family=["Noto Sans CJK JP"]) fig.text(0.05, 0.45, text, family=["DejaVu Sans", "Noto Sans CJK JP"]) @@ -434,6 +589,25 @@ For figure labels, ``Figure.supxlabel`` and ``Figure.supylabel``, the size and weight can be set separately from the figure title using :rc:`figure.labelsize` and :rc:`figure.labelweight`. +.. plot:: + :include-source: true + + # Original (previously combined with below) rcParams: + plt.rcParams['figure.titlesize'] = 64 + plt.rcParams['figure.titleweight'] = 'bold' + + # New rcParams: + plt.rcParams['figure.labelsize'] = 32 + plt.rcParams['figure.labelweight'] = 'bold' + + fig, axs = plt.subplots(2, 2, layout='constrained') + for ax in axs.flat: + ax.set(xlabel='xlabel', ylabel='ylabel') + + fig.suptitle('suptitle') + fig.supxlabel('supxlabel') + fig.supylabel('supylabel') + Note that if you have changed :rc:`figure.titlesize` or :rc:`figure.titleweight`, you must now also change the introduced parameters for a result consistent with past behaviour. @@ -487,14 +661,15 @@ The focal length can be calculated from a desired FOV via the equation: from mpl_toolkits.mplot3d import axes3d - fig, axs = plt.subplots(1, 3, subplot_kw={'projection': '3d'}) X, Y, Z = axes3d.get_test_data(0.05) - focal_lengths = [0.2, 1, np.inf] - for ax, fl in zip(axs, focal_lengths): + + fig, axs = plt.subplots(1, 3, figsize=(7, 4), + subplot_kw={'projection': '3d'}) + + for ax, focal_length in zip(axs, [0.2, 1, np.inf]): ax.plot_wireframe(X, Y, Z, rstride=10, cstride=10) - ax.set_proj_type('persp', focal_length=fl) - ax.set_title(f"focal_length = {fl}") - fig.set_size_inches(10, 4) + ax.set_proj_type('persp', focal_length=focal_length) + ax.set_title(f"{focal_length=}") 3D plots gained a 3rd "roll" viewing angle ------------------------------------------ @@ -510,9 +685,11 @@ existing 3D plots. :include-source: true from mpl_toolkits.mplot3d import axes3d - fig = plt.figure() - ax = fig.add_subplot(projection='3d') + X, Y, Z = axes3d.get_test_data(0.05) + + fig, ax = plt.subplots(subplot_kw={'projection': '3d'}) + ax.plot_wireframe(X, Y, Z, rstride=10, cstride=10) ax.view_init(elev=0, azim=0, roll=30) ax.set_title('elev=0, azim=0, roll=30') @@ -528,8 +705,12 @@ Users can set the aspect ratio for the X, Y, Z axes of a 3D plot to be 'equal', from itertools import combinations, product - aspects = ('auto', 'equal', 'equalxy', 'equalyz', 'equalxz') - fig, axs = plt.subplots(1, len(aspects), subplot_kw={'projection': '3d'}) + aspects = [ + ['auto', 'equal', '.'], + ['equalxy', 'equalyz', 'equalxz'], + ] + fig, axs = plt.subplot_mosaic(aspects, figsize=(7, 6), + subplot_kw={'projection': '3d'}) # Draw rectangular cuboid with side lengths [1, 1, 5] r = [0, 1] @@ -537,16 +718,14 @@ Users can set the aspect ratio for the X, Y, Z axes of a 3D plot to be 'equal', 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: + for ax in axs.values(): ax.plot3D(*zip(start*scale, end*scale), color='C0') # Set the aspect ratios - for i, ax in enumerate(axs): + for aspect, ax in axs.items(): ax.set_box_aspect((3, 4, 5)) - ax.set_aspect(aspects[i]) - ax.set_title(f"set_aspect('{aspects[i]}')") - - fig.set_size_inches(13, 3) + ax.set_aspect(aspect) + ax.set_title(f'set_aspect({aspect!r})') Interactive tool improvements ============================= From e467be43513efdee69c46acaea1dc23e68413c0f Mon Sep 17 00:00:00 2001 From: Elliott Sales de Andrade Date: Thu, 15 Sep 2022 15:48:11 -0400 Subject: [PATCH 8/8] Remove redundant behaviour changes in 3.6 --- .../api_changes_3.6.0/behaviour.rst | 21 ------------------- doc/users/prev_whats_new/whats_new_3.6.0.rst | 21 +++++++++++-------- 2 files changed, 12 insertions(+), 30 deletions(-) diff --git a/doc/api/prev_api_changes/api_changes_3.6.0/behaviour.rst b/doc/api/prev_api_changes/api_changes_3.6.0/behaviour.rst index 0a4a8869937c..a35584b04961 100644 --- a/doc/api/prev_api_changes/api_changes_3.6.0/behaviour.rst +++ b/doc/api/prev_api_changes/api_changes_3.6.0/behaviour.rst @@ -19,19 +19,6 @@ AGG renderer. Previously such a large image would be shown incorrectly. To prevent this downsampling and the warning it raises, manually downsample your data before handing it to `~matplotlib.axes.Axes.imshow`. -New *algorithm* keyword argument to ``contour`` and ``contourf`` -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -The contouring functions `~matplotlib.axes.Axes.contour` and -`~matplotlib.axes.Axes.contourf` have a new keyword argument *algorithm* to -control which algorithm is used to calculate the contours. There is a choice of -four algorithms to use, and the default is to use ``algorithm='mpl2014'`` which -is the same algorithm that Matplotlib has been using since 2014. - -Other possible values of the *algorithm* keyword argument are ``'mpl2005'``, -``'serial'`` and ``'threaded'``; see the `ContourPy documentation -`_ for further details. - Default date limits changed to 1970-01-01 – 1970-01-02 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -64,14 +51,6 @@ Previously `.Axis.get_ticklabels` (and `.Axes.get_xticklabels`, already been performed. Now the ticks and their labels are updated when the labels are requested. -Added *markerfacecoloralt* parameter to ``Axes.errorbar`` -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -The *markerfacecoloralt* parameter is now passed to the line plotter from -`.Axes.errorbar`. The documentation now accurately lists which properties are -passed to `.Line2D`, rather than claiming that all keyword arguments are passed -on. - Warning when scatter plot color settings discarded ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/doc/users/prev_whats_new/whats_new_3.6.0.rst b/doc/users/prev_whats_new/whats_new_3.6.0.rst index 50cf414852fe..60980fdced40 100644 --- a/doc/users/prev_whats_new/whats_new_3.6.0.rst +++ b/doc/users/prev_whats_new/whats_new_3.6.0.rst @@ -234,19 +234,22 @@ only be set globally via :rc:`contour.negative_linestyles`. axs[1].clabel(CS, fontsize=9, inline=True) axs[1].set_title('Dotted negative contours') -ContourPy used for quad contour calculations --------------------------------------------- +Imrpoved quad contour calculations via ContourPy +------------------------------------------------ + +The contouring functions `~.axes.Axes.contour` and `~.axes.Axes.contourf` have +a new keyword argument *algorithm* to control which algorithm is used to +calculate the contours. There is a choice of four algorithms to use, and the +default is to use ``algorithm='mpl2014'`` which is the same algorithm that +Matplotlib has been using since 2014. Previously Matplotlib shipped its own C++ code for calculating the contours of quad grids. Now the external library `ContourPy -`_ is used instead. There is a choice -of four algorithms to use, controlled by the *algorithm* keyword argument to -the functions `~.axes.Axes.contour` and `~.axes.Axes.contourf`. The default -behaviour is to use ``algorithm='mpl2014'`` which is the same algorithm that -Matplotlib has been using since 2014. +`_ is used instead. -See the `ContourPy documentation `_ for -further details of the different algorithms. +Other possible values of the *algorithm* keyword argument at this time are +``'mpl2005'``, ``'serial'`` and ``'threaded'``; see the `ContourPy +documentation `_ for further details. .. note:: 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