From e849cfc72517e2ddaef7c337a40e3359e9fc23ae Mon Sep 17 00:00:00 2001 From: Elliott Sales de Andrade Date: Thu, 11 Mar 2021 04:10:02 -0500 Subject: [PATCH 1/6] DOC: Move 3.4.0 development docs to final location. --- .../development/18356-JMK.rst | 17 -------------- .../next_api_changes/development/19500-AL.rst | 2 -- .../prev_api_changes/api_changes_3.4.0.rst | 8 +++++++ .../api_changes_3.4.0/development.rst | 23 +++++++++++++++++++ 4 files changed, 31 insertions(+), 19 deletions(-) delete mode 100644 doc/api/next_api_changes/development/18356-JMK.rst delete mode 100644 doc/api/next_api_changes/development/19500-AL.rst create mode 100644 doc/api/prev_api_changes/api_changes_3.4.0.rst create mode 100644 doc/api/prev_api_changes/api_changes_3.4.0/development.rst diff --git a/doc/api/next_api_changes/development/18356-JMK.rst b/doc/api/next_api_changes/development/18356-JMK.rst deleted file mode 100644 index 14d567c1fa38..000000000000 --- a/doc/api/next_api_changes/development/18356-JMK.rst +++ /dev/null @@ -1,17 +0,0 @@ -FigureBase class added, and Figure class made a child -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -The new subfigure feature motivated some re-organization of the -`.figure.Figure` class, so that the new `.figure.SubFigure` class could have -all the capabilities of a figure. - -The `.figure.Figure` class is now a subclass of `.figure.FigureBase`, where -`.figure.FigureBase` contains figure-level artist addition routines, and -the `.figure.Figure` subclass just contains features that are unique to the -outer figure. - -Note that there is a new *transSubfigure* transform -associated with the subfigure. This transform also exists for a -`.Figure` instance, and is equal to *transFigure* in that case, -so code that uses the transform stack that wants to place objects on either -the parent figure or one of the subfigures should use *transSubfigure*. diff --git a/doc/api/next_api_changes/development/19500-AL.rst b/doc/api/next_api_changes/development/19500-AL.rst deleted file mode 100644 index 677287905f25..000000000000 --- a/doc/api/next_api_changes/development/19500-AL.rst +++ /dev/null @@ -1,2 +0,0 @@ -Matplotlib now requires numpy>=1.16 -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/doc/api/prev_api_changes/api_changes_3.4.0.rst b/doc/api/prev_api_changes/api_changes_3.4.0.rst new file mode 100644 index 000000000000..1095e66634b0 --- /dev/null +++ b/doc/api/prev_api_changes/api_changes_3.4.0.rst @@ -0,0 +1,8 @@ +API Changes for 3.4.0 +===================== + +.. contents:: + :local: + :depth: 1 + +.. include:: /api/prev_api_changes/api_changes_3.4.0/development.rst diff --git a/doc/api/prev_api_changes/api_changes_3.4.0/development.rst b/doc/api/prev_api_changes/api_changes_3.4.0/development.rst new file mode 100644 index 000000000000..3821087539b6 --- /dev/null +++ b/doc/api/prev_api_changes/api_changes_3.4.0/development.rst @@ -0,0 +1,23 @@ +Development changes +------------------- + +Matplotlib now requires numpy>=1.16 +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +``FigureBase`` class added, and ``Figure`` class made a child +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +The new subfigure feature motivated some re-organization of the +`.figure.Figure` class, so that the new `.figure.SubFigure` class could have +all the capabilities of a figure. + +The `.figure.Figure` class is now a subclass of `.figure.FigureBase`, where +`.figure.FigureBase` contains figure-level artist addition routines, and the +`.figure.Figure` subclass just contains features that are unique to the outer +figure. + +Note that there is a new *transSubfigure* transform associated with the +subfigure. This transform also exists for a `.Figure` instance, and is equal +to *transFigure* in that case, so code that uses the transform stack that wants +to place objects on either the parent figure or one of the subfigures should +use *transSubfigure*. From fa6c7e18b0576d569256b6f2d19a1a4eb37e6323 Mon Sep 17 00:00:00 2001 From: Elliott Sales de Andrade Date: Thu, 11 Mar 2021 04:51:51 -0500 Subject: [PATCH 2/6] DOC: Set 3.4.0 API changes to be current version. --- doc/api/api_changes.rst | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/doc/api/api_changes.rst b/doc/api/api_changes.rst index 534d3dea8f31..b861326911a9 100644 --- a/doc/api/api_changes.rst +++ b/doc/api/api_changes.rst @@ -38,5 +38,4 @@ added to Matplotlib, see :ref:`whats-new` next_api_changes/development/* next_api_changes/removals/* -.. include:: prev_api_changes/api_changes_3.3.1.rst -.. include:: prev_api_changes/api_changes_3.3.0.rst +.. include:: prev_api_changes/api_changes_3.4.0.rst From 64c25c21201901bb194fc1ba77b1a53a7a96cd15 Mon Sep 17 00:00:00 2001 From: Elliott Sales de Andrade Date: Thu, 11 Mar 2021 16:02:38 -0500 Subject: [PATCH 3/6] DOC: Move 3.4.0 removal docs to final location. --- .../next_api_changes/removals/18069.DS.rst | 5 - .../next_api_changes/removals/18070-DS.rst | 15 -- .../next_api_changes/removals/18071-DS.rst | 9 - .../next_api_changes/removals/18073-DS.rst | 5 - .../next_api_changes/removals/18095-DS.rst | 5 - .../next_api_changes/removals/18201-DS.rst | 5 - .../next_api_changes/removals/18202-DS.rst | 6 - .../next_api_changes/removals/18502-TH.rst | 5 - .../next_api_changes/removals/18513-ES.rst | 11 -- .../next_api_changes/removals/18515-ES.rst | 33 ---- .../next_api_changes/removals/18516-ES.rst | 11 -- .../next_api_changes/removals/18522-ES.rst | 39 ---- .../next_api_changes/removals/18691-AL.rst | 9 - .../next_api_changes/removals/18747-ES.rst | 57 ------ .../next_api_changes/removals/18868-TH.rst | 4 - .../next_api_changes/removals/18909-TH.rst | 3 - .../next_api_changes/removals/XXXXX-AL.rst | 3 - .../prev_api_changes/api_changes_3.4.0.rst | 2 + .../api_changes_3.4.0/removals.rst | 177 ++++++++++++++++++ 19 files changed, 179 insertions(+), 225 deletions(-) delete mode 100644 doc/api/next_api_changes/removals/18069.DS.rst delete mode 100644 doc/api/next_api_changes/removals/18070-DS.rst delete mode 100644 doc/api/next_api_changes/removals/18071-DS.rst delete mode 100644 doc/api/next_api_changes/removals/18073-DS.rst delete mode 100644 doc/api/next_api_changes/removals/18095-DS.rst delete mode 100644 doc/api/next_api_changes/removals/18201-DS.rst delete mode 100644 doc/api/next_api_changes/removals/18202-DS.rst delete mode 100644 doc/api/next_api_changes/removals/18502-TH.rst delete mode 100644 doc/api/next_api_changes/removals/18513-ES.rst delete mode 100644 doc/api/next_api_changes/removals/18515-ES.rst delete mode 100644 doc/api/next_api_changes/removals/18516-ES.rst delete mode 100644 doc/api/next_api_changes/removals/18522-ES.rst delete mode 100644 doc/api/next_api_changes/removals/18691-AL.rst delete mode 100644 doc/api/next_api_changes/removals/18747-ES.rst delete mode 100644 doc/api/next_api_changes/removals/18868-TH.rst delete mode 100644 doc/api/next_api_changes/removals/18909-TH.rst delete mode 100644 doc/api/next_api_changes/removals/XXXXX-AL.rst create mode 100644 doc/api/prev_api_changes/api_changes_3.4.0/removals.rst diff --git a/doc/api/next_api_changes/removals/18069.DS.rst b/doc/api/next_api_changes/removals/18069.DS.rst deleted file mode 100644 index f55bf30bbd07..000000000000 --- a/doc/api/next_api_changes/removals/18069.DS.rst +++ /dev/null @@ -1,5 +0,0 @@ -Removed support for single color strings in `~.colors.to_rgba_array` -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -Converting a string with single color characters (e.g. ``'cymk'``) in -`~.colors.to_rgba_array` is no longer supported. Instead, the colors can be -passed individually in a list (e.g. ``['c', 'y', 'm', 'k']``). diff --git a/doc/api/next_api_changes/removals/18070-DS.rst b/doc/api/next_api_changes/removals/18070-DS.rst deleted file mode 100644 index d6bbe3f86263..000000000000 --- a/doc/api/next_api_changes/removals/18070-DS.rst +++ /dev/null @@ -1,15 +0,0 @@ -`.rcsetup` removals -~~~~~~~~~~~~~~~~~~~ -The following functions in `matplotlib.rcsetup` have been removed: - -- ``validate_path_exists`` - use `os.path.exists` instead. -- ``update_savefig_format`` - this just replaced ``'auto'`` with ``'png'``. -- ``validate_animation_writer_path``. - -Changes to valid rcParams -~~~~~~~~~~~~~~~~~~~~~~~~~ -The following rcParam values are no longer valid: - -- Setting :rc:`savefig.format` to ``"auto"`` - use ``"png"`` instead. -- Seeting :rc:`boxplot.whiskers` to ``"range"`` - set it to ``0, 100`` instead. -- Setting :rc:`text.hinting` to `False` or `True` - set it to ``"auto"`` or ``"none"`` respectively. diff --git a/doc/api/next_api_changes/removals/18071-DS.rst b/doc/api/next_api_changes/removals/18071-DS.rst deleted file mode 100644 index b3895d909bd9..000000000000 --- a/doc/api/next_api_changes/removals/18071-DS.rst +++ /dev/null @@ -1,9 +0,0 @@ -`matplotlib.animation` -~~~~~~~~~~~~~~~~~~~~~~ - -The following `~.animation.MovieWriterRegistry` methods have been removed: - -- ``.set_dirty()`` - does nothing. -- ``.ensure_not_dirty()`` - does nothing. -- ``.reset_available_writers()`` - does nothing. -- ``.avail()`` - use ``.list()`` instead to get a list of available writers. diff --git a/doc/api/next_api_changes/removals/18073-DS.rst b/doc/api/next_api_changes/removals/18073-DS.rst deleted file mode 100644 index 015ba418ffd6..000000000000 --- a/doc/api/next_api_changes/removals/18073-DS.rst +++ /dev/null @@ -1,5 +0,0 @@ -``matplotlib.testing.disable_internet`` -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -The entire ``matplotlib.testing.disable_internet`` sub-module has been removed. -The `pytest-remotedata package `_ -can be used instead. diff --git a/doc/api/next_api_changes/removals/18095-DS.rst b/doc/api/next_api_changes/removals/18095-DS.rst deleted file mode 100644 index 379877cbf4e6..000000000000 --- a/doc/api/next_api_changes/removals/18095-DS.rst +++ /dev/null @@ -1,5 +0,0 @@ -`~matplotlib.scale` keyword arguments -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -`.scale.ScaleBase`, `.scale.LinearScale` and `.scale.SymmetricalLogScale` -now error if any unexpected keyword arguments are passed to their -constructors. diff --git a/doc/api/next_api_changes/removals/18201-DS.rst b/doc/api/next_api_changes/removals/18201-DS.rst deleted file mode 100644 index 0e079262fb7f..000000000000 --- a/doc/api/next_api_changes/removals/18201-DS.rst +++ /dev/null @@ -1,5 +0,0 @@ -`matplotlib.colors` removals -~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -- ``makeMappingArray`` has been removed. -- ``DivergingNorm`` has been renamed to `~matplotlib.colors.TwoSlopeNorm`. diff --git a/doc/api/next_api_changes/removals/18202-DS.rst b/doc/api/next_api_changes/removals/18202-DS.rst deleted file mode 100644 index 840c28010bfe..000000000000 --- a/doc/api/next_api_changes/removals/18202-DS.rst +++ /dev/null @@ -1,6 +0,0 @@ -`matplotlib.testing` removals -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -- ``testing.is_called_from_pytest`` has been removed. -- ``jpl_units.Unitdbl.checkUnits`` has been removed. Use - ``units not in self.allowed`` instead. diff --git a/doc/api/next_api_changes/removals/18502-TH.rst b/doc/api/next_api_changes/removals/18502-TH.rst deleted file mode 100644 index e4488c8774f7..000000000000 --- a/doc/api/next_api_changes/removals/18502-TH.rst +++ /dev/null @@ -1,5 +0,0 @@ -``matplotlib.cm`` removals -~~~~~~~~~~~~~~~~~~~~~~~~~~ - -- ``matplotlib.cm.revcmap()`` has been removed. Use ``Colormap.reversed()`` - instead. diff --git a/doc/api/next_api_changes/removals/18513-ES.rst b/doc/api/next_api_changes/removals/18513-ES.rst deleted file mode 100644 index 62ed3b92565e..000000000000 --- a/doc/api/next_api_changes/removals/18513-ES.rst +++ /dev/null @@ -1,11 +0,0 @@ -Locators -~~~~~~~~ -The unused ``Locator.autoscale`` method has been removed (pass the axis limits -to `.Locator.view_limits` instead). Any derived methods are also removed: - -* ``Locator.autoscale`` -* ``AutoDateLocator.autoscale`` -* ``RRuleLocator.autoscale`` -* ``RadialLocator.autoscale`` -* ``ThetaLocator.autoscale`` -* ``YearLocator.autoscale`` diff --git a/doc/api/next_api_changes/removals/18515-ES.rst b/doc/api/next_api_changes/removals/18515-ES.rst deleted file mode 100644 index e9724e82725b..000000000000 --- a/doc/api/next_api_changes/removals/18515-ES.rst +++ /dev/null @@ -1,33 +0,0 @@ -GTK -~~~ - -The following methods and properties have been removed: - -* ``ConfigureSubplotsGTK3.destroy`` method -* ``ConfigureSubplotsGTK3.init_window`` method -* ``ConfigureSubplotsGTK3.window`` property - -WX -~~ -``FigureFrameWx.statusbar``, ``NavigationToolbar2Wx.set_status_bar``, and -``NavigationToolbar2Wx.statbar`` have been removed. The status bar can be -retrieved by calling standard wx methods (``frame.GetStatusBar()`` and -``toolbar.GetTopLevelParent().GetStatusBar()``). - -``backend_wx.ConfigureSubplotsWx.configure_subplots`` and -``backend_wx.ConfigureSubplotsWx.get_canvas`` have been removed. - -PGF -~~~ -``backend_pgf.repl_escapetext`` and ``backend_pgf.repl_mathdefault`` have been -removed. - -``RendererPgf.latexManager`` has been removed. - -FigureCanvas -~~~~~~~~~~~~ -``FigureCanvasBase.draw_cursor`` and ``FigureCanvasMac.invalidate`` have been -removed. - -The ``dryrun`` parameter to the various ``FigureCanvasFoo.print_foo`` methods -has been removed. diff --git a/doc/api/next_api_changes/removals/18516-ES.rst b/doc/api/next_api_changes/removals/18516-ES.rst deleted file mode 100644 index e1469bcd39dc..000000000000 --- a/doc/api/next_api_changes/removals/18516-ES.rst +++ /dev/null @@ -1,11 +0,0 @@ -Fonts -~~~~~ -``font_manager.JSONEncoder`` has been removed. Use `.font_manager.json_dump` to -dump a `.FontManager` instance. - -``font_manager.createFontList`` has been removed. `.font_manager.FontManager.addfont` -is now available to register a font at a given path. - -The ``as_str``, ``as_rgba_str``, ``as_array``, ``get_width`` and ``get_height`` -methods of ``matplotlib.ft2font.FT2Image`` have been removed. Convert the -``FT2Image`` to a NumPy array with ``np.asarray`` before processing it. diff --git a/doc/api/next_api_changes/removals/18522-ES.rst b/doc/api/next_api_changes/removals/18522-ES.rst deleted file mode 100644 index 27f5bd5bc8bd..000000000000 --- a/doc/api/next_api_changes/removals/18522-ES.rst +++ /dev/null @@ -1,39 +0,0 @@ -``matplotlib.mlab`` -~~~~~~~~~~~~~~~~~~~ -``mlab.apply_window`` and ``mlab.stride_repeat`` have been removed. - -Axes3D -~~~~~~ -``axes3d.unit_bbox`` has been removed; use ``Bbox.unit`` instead. - -axisartist -~~~~~~~~~~ -``mpl_toolkits.axisartist.grid_finder.GridFinderBase`` has been removed; use -`.GridFinder` instead. - -``axisartist.axis_artist.BezierPath`` has been removed; use -`.patches.PathPatch` instead. - -Returning a factor equal to None from axisartist Locators (which are **not** -the same as "standard" tick Locators), or passing a factor equal to None -to axisartist Formatters (which are **not** the same as "standard" tick -Formatters) is no longer supported. Pass a factor equal to 1 instead. - -Misc -~~~~ -``matplotlib.get_home`` has been removed; use standard library instead. - -``matplotlib.compare_versions`` has been removed; use comparison of -``distutils.version.LooseVersion``\s instead. - -``matplotlib.checkdep_ps_distiller`` has been removed. - -``matplotlib.figure.AxesStack`` has been removed. - -``BboxBase.is_unit`` has been removed; check the `.Bbox` extents if needed. - -``Affine2DBase.matrix_from_values(...)`` has been removed; use (for example) -``Affine2D.from_values(...).get_matrix()`` instead. - -``style.core.is_style_file`` and ``style.core.iter_style_files`` have been -removed. diff --git a/doc/api/next_api_changes/removals/18691-AL.rst b/doc/api/next_api_changes/removals/18691-AL.rst deleted file mode 100644 index 5205383f1f1c..000000000000 --- a/doc/api/next_api_changes/removals/18691-AL.rst +++ /dev/null @@ -1,9 +0,0 @@ -sample_data removals -~~~~~~~~~~~~~~~~~~~~ -The sample datasets listed below have been removed. Suggested replacements for -demonstration purposes are listed in parentheses. -- ``None_vs_nearest-pdf.png``, -- ``aapl.npz`` (use ``goog.npz``), -- ``ada.png``, ``grace_hopper.png`` (use ``grace_hopper.jpg``), -- ``ct.raw.gz`` (use ``s1045.ima.gz``), -- ``damodata.csv`` (use ``msft.csv``). diff --git a/doc/api/next_api_changes/removals/18747-ES.rst b/doc/api/next_api_changes/removals/18747-ES.rst deleted file mode 100644 index 8216000dd95d..000000000000 --- a/doc/api/next_api_changes/removals/18747-ES.rst +++ /dev/null @@ -1,57 +0,0 @@ -``Axes`` methods and properties -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -- ``axes.Axes.get_data_ratio_log`` -- ``axes.SubplotBase.rowNum``; use ``ax.get_subplotspec().rowspan.start`` - instead -- ``axes.SubplotBase.colNum``; use ``ax.get_subplotspec().colspan.start`` - instead -- the *verts* parameter to ``scatter`` (use *marker* instead) -- Passing more than one positional argument to `~matplotlib.axes.Axes.axis` - will now raise an error. -- Passing ``"range"`` to the *whis* parameter of `.Axes.boxplot` and - `.cbook.boxplot_stats` to mean "the whole data range" is no longer - supported. -- Passing scalars to parameter *where* in `.axes.Axes.fill_between` and - `.axes.Axes.fill_betweenx` is no longer accepted and non-matching sizes now - raise a `ValueError`. - -``dates`` functions -~~~~~~~~~~~~~~~~~~~ -- ``dates.mx2num`` - -``quiver`` methods -~~~~~~~~~~~~~~~~~~ - -- ``quiver.QuiverKey.quiverkey_doc`` has been removed; use - ``quiver.QuiverKey.__init__.__doc__`` instead. - -Smart bounds -~~~~~~~~~~~~ - -The "smart bounds" functionality on `~.axis.Axis` and `.Spine` has been -deleted, and the following methods are removed: - -- ``Axis.set_smart_bounds`` and ``Axis.get_smart_bounds`` -- ``Spine.set_smart_bounds`` and ``Spine.get_smart_bounds`` - -Testing -~~~~~~~ -The *switch_backend_warn* parameter to ``matplotlib.test`` has no effect and -has been removed. - -``tight_layout()`` -~~~~~~~~~~~~~~~~~~ -The *renderer* parameter to `.Figure.tight_layout` has been removed; this -method now always uses the renderer instance cached on the `.Figure`. - -``axes_grid1`` -~~~~~~~~~~~~~~ -The ``mpl_toolkits.axes_grid1.colorbar`` module and its colorbar implementation -have been removed in favor of :mod:`matplotlib.colorbar`. Additionally: - -- The *locator* parameter to ``colorbar()`` has been removed in favor of its - synonym *ticks* (which already existed previously, and is consistent with - :mod:`matplotlib.colorbar`). -- The ``mpl_toolkits.legacy_colorbar`` rcParam has no effect and also has been - removed. diff --git a/doc/api/next_api_changes/removals/18868-TH.rst b/doc/api/next_api_changes/removals/18868-TH.rst deleted file mode 100644 index 3c96775fde80..000000000000 --- a/doc/api/next_api_changes/removals/18868-TH.rst +++ /dev/null @@ -1,4 +0,0 @@ -Parameter minor in set_ticks() is keyword-only -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -The parameter *minor* in `.Axis.set_ticks` and ``SecondaryAxis.set_ticks`` is -now keyword-only. \ No newline at end of file diff --git a/doc/api/next_api_changes/removals/18909-TH.rst b/doc/api/next_api_changes/removals/18909-TH.rst deleted file mode 100644 index 76fbd3260958..000000000000 --- a/doc/api/next_api_changes/removals/18909-TH.rst +++ /dev/null @@ -1,3 +0,0 @@ -``Artist.eventson`` and ``Container.eventson`` -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -These attributes have no effect and thus have been removed. diff --git a/doc/api/next_api_changes/removals/XXXXX-AL.rst b/doc/api/next_api_changes/removals/XXXXX-AL.rst deleted file mode 100644 index f83e21cf8764..000000000000 --- a/doc/api/next_api_changes/removals/XXXXX-AL.rst +++ /dev/null @@ -1,3 +0,0 @@ -The "datapath" rcParam has been removed. -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -Use `matplotlib.get_data_path` instead. diff --git a/doc/api/prev_api_changes/api_changes_3.4.0.rst b/doc/api/prev_api_changes/api_changes_3.4.0.rst index 1095e66634b0..bd47331a8988 100644 --- a/doc/api/prev_api_changes/api_changes_3.4.0.rst +++ b/doc/api/prev_api_changes/api_changes_3.4.0.rst @@ -5,4 +5,6 @@ API Changes for 3.4.0 :local: :depth: 1 +.. include:: /api/prev_api_changes/api_changes_3.4.0/removals.rst + .. include:: /api/prev_api_changes/api_changes_3.4.0/development.rst diff --git a/doc/api/prev_api_changes/api_changes_3.4.0/removals.rst b/doc/api/prev_api_changes/api_changes_3.4.0/removals.rst new file mode 100644 index 000000000000..1f558800bd8f --- /dev/null +++ b/doc/api/prev_api_changes/api_changes_3.4.0/removals.rst @@ -0,0 +1,177 @@ +Removals +-------- +The following deprecated APIs have been removed: + +Removed behaviour +~~~~~~~~~~~~~~~~~ + +- The "smart bounds" functionality on `~.axis.Axis` and `.Spine` has been + deleted, and the related methods have been removed. +- Converting a string with single color characters (e.g. ``'cymk'``) in + `~.colors.to_rgba_array` is no longer supported. Instead, the colors can be + passed individually in a list (e.g. ``['c', 'y', 'm', 'k']``). +- Returning a factor equal to ``None`` from ``mpl_toolkits.axisartist`` + Locators (which are **not** the same as "standard" tick Locators), or passing + a factor equal to ``None`` to axisartist Formatters (which are **not** the + same as "standard" tick Formatters) is no longer supported. Pass a factor + equal to 1 instead. + +Modules +~~~~~~~ + +- The entire ``matplotlib.testing.disable_internet`` module has been removed. + The `pytest-remotedata package + `_ can be used instead. +- The ``mpl_toolkits.axes_grid1.colorbar`` module and its colorbar + implementation have been removed in favor of `matplotlib.colorbar`. + +Classes, methods and attributes +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +- The `.animation.MovieWriterRegistry` methods ``.set_dirty()``, + ``.ensure_not_dirty()``, and ``.reset_available_writers()`` do nothing and + have been removed. The ``.avail()`` method has been removed; use ``.list()`` + instead to get a list of available writers. +- The ``matplotlib.artist.Artist.eventson`` and + ``matplotlib.container.Container.eventson`` attributes have no effect and + have been removed. +- ``matplotlib.axes.Axes.get_data_ratio_log`` has been removed. +- ``matplotlib.axes.SubplotBase.rowNum``; use + ``ax.get_subplotspec().rowspan.start`` instead. +- ``matplotlib.axes.SubplotBase.colNum``; use + ``ax.get_subplotspec().colspan.start`` instead. +- ``matplotlib.axis.Axis.set_smart_bounds`` and + ``matplotlib.axis.Axis.get_smart_bounds`` have been removed. +- ``matplotlib.colors.DivergingNorm`` has been renamed to + `~matplotlib.colors.TwoSlopeNorm`. +- ``matplotlib.figure.AxesStack`` has been removed. +- ``matplotlib.font_manager.JSONEncoder`` has been removed; use + `.font_manager.json_dump` to dump a `.FontManager` instance. +- The ``matplotlib.ft2font.FT2Image`` methods ``.as_array()``, + ``.as_rgba_str()``, ``.as_str()``, ``.get_height()`` and ``.get_width()`` + have been removed. Convert the ``FT2Image`` to a NumPy array with + ``np.asarray`` before processing it. +- ``matplotlib.quiver.QuiverKey.quiverkey_doc`` has been removed; use + ``matplotlib.quiver.QuiverKey.__init__.__doc__`` instead. +- ``matplotlib.spines.Spine.set_smart_bounds`` and + ``matplotlib.spines.Spine.get_smart_bounds`` have been removed. +- ``matplotlib.testing.jpl_units.UnitDbl.checkUnits`` has been removed; use + ``units not in self.allowed`` instead. +- The unused ``matplotlib.ticker.Locator.autoscale`` method has been removed + (pass the axis limits to `.Locator.view_limits` instead). The derived methods + ``Locator.autoscale``, ``AutoDateLocator.autoscale``, + ``RRuleLocator.autoscale``, ``RadialLocator.autoscale``, + ``ThetaLocator.autoscale``, and ``YearLocator.autoscale`` have also been + removed. +- ``matplotlib.transforms.BboxBase.is_unit`` has been removed; check the + `.Bbox` extents if needed. +- ``matplotlib.transforms.Affine2DBase.matrix_from_values(...)`` has been + removed; use (for example) ``Affine2D.from_values(...).get_matrix()`` + instead. + +* ``matplotlib.backend_bases.FigureCanvasBase.draw_cursor`` has been removed. +* ``matplotlib.backends.backend_gtk.ConfigureSubplotsGTK3.destroy`` and + ``matplotlib.backends.backend_gtk.ConfigureSubplotsGTK3.init_window`` methods + have been removed. +* ``matplotlib.backends.backend_gtk.ConfigureSubplotsGTK3.window`` property has + been removed. +* ``matplotlib.backends.backend_macosx.FigureCanvasMac.invalidate`` has been + removed. +* ``matplotlib.backends.backend_pgf.RendererPgf.latexManager`` has been removed. +* ``matplotlib.backends.backend_wx.FigureFrameWx.statusbar``, + ``matplotlib.backends.backend_wx.NavigationToolbar2Wx.set_status_bar``, and + ``matplotlib.backends.backend_wx.NavigationToolbar2Wx.statbar`` have been + removed. The status bar can be retrieved by calling standard wx methods + (``frame.GetStatusBar()`` and + ``toolbar.GetTopLevelParent().GetStatusBar()``). +* ``matplotlib.backends.backend_wx.ConfigureSubplotsWx.configure_subplots`` and + ``matplotlib.backends.backend_wx.ConfigureSubplotsWx.get_canvas`` have been + removed. + + +- ``mpl_toolkits.axisartist.grid_finder.GridFinderBase`` has been removed; use + `.GridFinder` instead. +- ``mpl_toolkits.axisartist.axis_artist.BezierPath`` has been removed; use + `.patches.PathPatch` instead. + +Functions +~~~~~~~~~ + +- ``matplotlib.backends.backend_pgf.repl_escapetext`` and + ``matplotlib.backends.backend_pgf.repl_mathdefault`` have been removed. +- ``matplotlib.checkdep_ps_distiller`` has been removed. +- ``matplotlib.cm.revcmap`` has been removed; use `.Colormap.reversed` + instead. +- ``matplotlib.colors.makeMappingArray`` has been removed. +- ``matplotlib.compare_versions`` has been removed; use comparison of + ``distutils.version.LooseVersion``\s instead. +- ``matplotlib.dates.mx2num`` has been removed. +- ``matplotlib.font_manager.createFontList`` has been removed; + `.font_manager.FontManager.addfont` is now available to register a font at a + given path. +- ``matplotlib.get_home`` has been removed; use standard library instead. +- ``matplotlib.mlab.apply_window`` and ``matplotlib.mlab.stride_repeat`` have + been removed. +- ``matplotlib.rcsetup.update_savefig_format`` has been removed; this just + replaced ``'auto'`` with ``'png'``, so do the same. +- ``matplotlib.rcsetup.validate_animation_writer_path`` has been removed. +- ``matplotlib.rcsetup.validate_path_exists`` has been removed; use + `os.path.exists` or `pathlib.Path.exists` instead. +- ``matplotlib.style.core.is_style_file`` and + ``matplotlib.style.core.iter_style_files`` have been removed. +- ``matplotlib.testing.is_called_from_pytest`` has been removed. +- ``mpl_toolkits.mplot3d.axes3d.unit_bbox`` has been removed; use `.Bbox.unit` + instead. + + +Arguments +~~~~~~~~~ + +- Passing more than one positional argument to `.axes.Axes.axis` will now + raise an error. +- Passing ``"range"`` to the *whis* parameter of `.Axes.boxplot` and + `.cbook.boxplot_stats` to mean "the whole data range" is no longer + supported. +- Passing scalars to the *where* parameter in `.axes.Axes.fill_between` and + `.axes.Axes.fill_betweenx` is no longer accepted and non-matching sizes now + raise a `ValueError`. +- The *verts* parameter to `.Axes.scatter` has been removed; use *marker* instead. +- The *minor* parameter in `.Axis.set_ticks` and ``SecondaryAxis.set_ticks`` is + now keyword-only. +- `.scale.ScaleBase`, `.scale.LinearScale` and `.scale.SymmetricalLogScale` now + error if any unexpected keyword arguments are passed to their constructors. +- The *renderer* parameter to `.Figure.tight_layout` has been removed; this + method now always uses the renderer instance cached on the `.Figure`. +- The *locator* parameter to + `mpl_toolkits.axes_grid1.axes_grid.CbarAxesBase.colorbar` has been removed in + favor of its synonym *ticks* (which already existed previously, + and is consistent with :mod:`matplotlib.colorbar`). +- The *switch_backend_warn* parameter to ``matplotlib.test`` has no effect and + has been removed. +- The *dryrun* parameter to the various ``FigureCanvas*.print_*`` methods has + been removed. + +rcParams +~~~~~~~~ + +- The ``datapath`` rcParam has been removed. Use `matplotlib.get_data_path` + instead. +- The ``mpl_toolkits.legacy_colorbar`` rcParam has no effect and has been + removed. +- Setting :rc:`boxplot.whiskers` to ``"range"`` is no longer valid; set it to + ``0, 100`` instead. +- Setting :rc:`savefig.format` to ``"auto"`` is no longer valid; use ``"png"`` + instead. +- Setting :rc:`text.hinting` to `False` or `True` is no longer valid; set it to + ``"auto"`` or ``"none"`` respectively. + +sample_data removals +~~~~~~~~~~~~~~~~~~~~ +The sample datasets listed below have been removed. Suggested replacements for +demonstration purposes are listed in parentheses. + +- ``None_vs_nearest-pdf.png``, +- ``aapl.npz`` (use ``goog.npz``), +- ``ada.png``, ``grace_hopper.png`` (use ``grace_hopper.jpg``), +- ``ct.raw.gz`` (use ``s1045.ima.gz``), +- ``damodata.csv`` (use ``msft.csv``). From 7f0296fd85dc0a750abf86af8ae9cd9946c51a11 Mon Sep 17 00:00:00 2001 From: Elliott Sales de Andrade Date: Fri, 12 Mar 2021 00:57:48 -0500 Subject: [PATCH 4/6] DOC: Move 3.4.0 behaviour change docs to final location. --- .../next_api_changes/behavior/15127-TAC.rst | 8 - .../next_api_changes/behavior/16220-AL.rst | 8 - .../next_api_changes/behavior/17159-ST.rst | 15 - .../next_api_changes/behavior/17371-IHI.rst | 7 - .../next_api_changes/behavior/17494-JMK.rst | 25 -- .../next_api_changes/behavior/17727-JMK.rst | 10 - .../next_api_changes/behavior/17791-AL.rst | 28 -- .../next_api_changes/behavior/17828-TAC.rst | 20 - .../next_api_changes/behavior/17834-AL.rst | 5 - .../next_api_changes/behavior/17897-KLP.rst | 11 - .../next_api_changes/behavior/17930-ES.rst | 8 - .../next_api_changes/behavior/18127-ES.rst | 11 - .../next_api_changes/behavior/18172-IHI.rst | 6 - .../next_api_changes/behavior/18193-BKB.rst | 10 - .../next_api_changes/behavior/18203-DS.rst | 5 - .../next_api_changes/behavior/18320-ES.rst | 6 - .../next_api_changes/behavior/18440-AL.rst | 2 - .../next_api_changes/behavior/18525-ES.rst | 5 - .../next_api_changes/behavior/18532-AL.rst | 4 - .../next_api_changes/behavior/18560-AL.rst | 4 - .../next_api_changes/behavior/18564-AL.rst | 25 -- .../next_api_changes/behavior/18623-AL.rst | 8 - .../next_api_changes/behavior/18772-BGB.rst | 12 - .../next_api_changes/behavior/18894-AL.rst | 3 - .../next_api_changes/behavior/18989-TH.rst | 5 - .../next_api_changes/behavior/19438-TAC.rst | 65 ---- doc/api/next_api_changes/behavior/8987-Z.rst | 6 - .../prev_api_changes/api_changes_3.4.0.rst | 2 + .../api_changes_3.4.0/behaviour.rst | 353 ++++++++++++++++++ 29 files changed, 355 insertions(+), 322 deletions(-) delete mode 100644 doc/api/next_api_changes/behavior/15127-TAC.rst delete mode 100644 doc/api/next_api_changes/behavior/16220-AL.rst delete mode 100644 doc/api/next_api_changes/behavior/17159-ST.rst delete mode 100644 doc/api/next_api_changes/behavior/17371-IHI.rst delete mode 100644 doc/api/next_api_changes/behavior/17494-JMK.rst delete mode 100644 doc/api/next_api_changes/behavior/17727-JMK.rst delete mode 100644 doc/api/next_api_changes/behavior/17791-AL.rst delete mode 100644 doc/api/next_api_changes/behavior/17828-TAC.rst delete mode 100644 doc/api/next_api_changes/behavior/17834-AL.rst delete mode 100644 doc/api/next_api_changes/behavior/17897-KLP.rst delete mode 100644 doc/api/next_api_changes/behavior/17930-ES.rst delete mode 100644 doc/api/next_api_changes/behavior/18127-ES.rst delete mode 100644 doc/api/next_api_changes/behavior/18172-IHI.rst delete mode 100644 doc/api/next_api_changes/behavior/18193-BKB.rst delete mode 100644 doc/api/next_api_changes/behavior/18203-DS.rst delete mode 100644 doc/api/next_api_changes/behavior/18320-ES.rst delete mode 100644 doc/api/next_api_changes/behavior/18440-AL.rst delete mode 100644 doc/api/next_api_changes/behavior/18525-ES.rst delete mode 100644 doc/api/next_api_changes/behavior/18532-AL.rst delete mode 100644 doc/api/next_api_changes/behavior/18560-AL.rst delete mode 100644 doc/api/next_api_changes/behavior/18564-AL.rst delete mode 100644 doc/api/next_api_changes/behavior/18623-AL.rst delete mode 100644 doc/api/next_api_changes/behavior/18772-BGB.rst delete mode 100644 doc/api/next_api_changes/behavior/18894-AL.rst delete mode 100644 doc/api/next_api_changes/behavior/18989-TH.rst delete mode 100644 doc/api/next_api_changes/behavior/19438-TAC.rst delete mode 100644 doc/api/next_api_changes/behavior/8987-Z.rst create mode 100644 doc/api/prev_api_changes/api_changes_3.4.0/behaviour.rst diff --git a/doc/api/next_api_changes/behavior/15127-TAC.rst b/doc/api/next_api_changes/behavior/15127-TAC.rst deleted file mode 100644 index fd68c0150551..000000000000 --- a/doc/api/next_api_changes/behavior/15127-TAC.rst +++ /dev/null @@ -1,8 +0,0 @@ -Raise or warn on registering a colormap twice -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -When using `matplotlib.cm.register_cmap` to register a user provided -or third-party colormap it will now raise a `ValueError` if trying to -over-write one of the built in colormaps and warn if trying to over -write a user registered colormap. This may raise for user-registered -colormaps in the future. diff --git a/doc/api/next_api_changes/behavior/16220-AL.rst b/doc/api/next_api_changes/behavior/16220-AL.rst deleted file mode 100644 index e2ecca545d06..000000000000 --- a/doc/api/next_api_changes/behavior/16220-AL.rst +++ /dev/null @@ -1,8 +0,0 @@ -Canvas's callback registry now stored on Figure -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -The canonical location of the `~.cbook.CallbackRegistry` used to -handle Figure/Canvas events has been moved from the Canvas to the -Figure. This change should be transparent to almost all users, -however if you are swapping switching the Figure out from on top of a -Canvas or visa versa you may see a change in behavior. diff --git a/doc/api/next_api_changes/behavior/17159-ST.rst b/doc/api/next_api_changes/behavior/17159-ST.rst deleted file mode 100644 index 5aed41e9f352..000000000000 --- a/doc/api/next_api_changes/behavior/17159-ST.rst +++ /dev/null @@ -1,15 +0,0 @@ -Consecutive rasterized draws now merged ---------------------------------------- - -Tracking of depth of raster draws has moved from -`.backend_mixed.MixedModeRenderer.start_rasterizing` and -`.backend_mixed.MixedModeRenderer.stop_rasterizing` into -`.artist.allow_rasterization`. This means the start and stop functions are -only called when the rasterization actually needs to be started and stopped. - -The output of vector backends will change in the case that rasterized -elements are merged. This should not change the appearance of outputs. - -The renders in 3rd party backends are now expected to have -``self._raster_depth`` and ``self._rasterizing`` initialized to ``0`` and -``False`` respectively. diff --git a/doc/api/next_api_changes/behavior/17371-IHI.rst b/doc/api/next_api_changes/behavior/17371-IHI.rst deleted file mode 100644 index 34fa9e03ae85..000000000000 --- a/doc/api/next_api_changes/behavior/17371-IHI.rst +++ /dev/null @@ -1,7 +0,0 @@ -ioff and ion can be used as context managers -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -`.pyplot.ion` and `.pyplot.ioff` may now be used as context managers to create -a context with interactive mode on, or off respectively. The old behavior of -calling these functions is maintained. To use the new functionality -call as ``with plt.ioff():`` diff --git a/doc/api/next_api_changes/behavior/17494-JMK.rst b/doc/api/next_api_changes/behavior/17494-JMK.rst deleted file mode 100644 index 2833ff3dcdbf..000000000000 --- a/doc/api/next_api_changes/behavior/17494-JMK.rst +++ /dev/null @@ -1,25 +0,0 @@ -Constrained layout rewrite -~~~~~~~~~~~~~~~~~~~~~~~~~~ - -The layout manager ``constrained_layout`` was re-written with different -outer constraints that should be more robust to complicated subplot layouts. -User-facing changes are: - -- some poorly constrained layouts will have different width/height plots than - before. -- colorbars now respect the ``anchor`` keyword argument of - `matplotlib.colorbar.make_axes` -- colorbars are wider. -- colorbars in different rows or columns line up more robustly. -- *hspace* and *wspace* options to `.Figure.set_constrained_layout_pads` - were twice as wide as the docs said they should be. So these now follow - the docs. - -This feature will remain "experimental" until the new changes have been -used enough by users, so we anticipate version 3.5 or 3.6. On the other hand, -``constrained_layout`` is extensively tested and used in examples in the -library, so using it should be safe, but layouts may not be exactly the same -as more development takes place. - -Details of using ``constrained_layout``, and its algorithm are available at -:doc:`/tutorials/intermediate/constrainedlayout_guide` diff --git a/doc/api/next_api_changes/behavior/17727-JMK.rst b/doc/api/next_api_changes/behavior/17727-JMK.rst deleted file mode 100644 index cc6716f29184..000000000000 --- a/doc/api/next_api_changes/behavior/17727-JMK.rst +++ /dev/null @@ -1,10 +0,0 @@ - -Date locator for DAILY interval now returns middle of month -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -The `matplotlib.dates.AutoDateLocator` has a default of -``interval_multiples=True`` that attempts to align ticks with the start of -meaningful intervals like the start of the month, or start of the day, etc. -That lead to approximately 140-day intervals being mapped to the first and 22nd -of the month. This has now been changed so that it chooses the first and -15th of the month, which is probably what most people want. diff --git a/doc/api/next_api_changes/behavior/17791-AL.rst b/doc/api/next_api_changes/behavior/17791-AL.rst deleted file mode 100644 index 64147f2122f1..000000000000 --- a/doc/api/next_api_changes/behavior/17791-AL.rst +++ /dev/null @@ -1,28 +0,0 @@ -Harmonized key event data across backends -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -The different backends wth key translation support, now handle 'shift' -as a sometimes modifier, where the 'shift' prefix won't be added if a -key translation was made. - -The *matplotlib.backends.backend_qt5.SPECIAL_KEYS* dictionary contains -keys that do *not* return their unicode name instead they have -manually specified names. The name for *QtCore.Qt.Key_Meta* has -changed to 'meta' to be consistent with the other GUI backends. - -The WebAgg backend now handles key translations correctly on non-US -keyboard layouts. - - -**GTK/Tk key name changes** - -The handling of non-ASCII keypresses (as reported in the KeyEvent passed to -``key_press_event``-handlers) in the GTK and Tk backends now correctly reports -Unicode characters (e.g., €), and better respects NumLock on the numpad. - -The following key names have changed; the new names are consistent with those -reported by the Qt backends: - -- The "Break/Pause" key (keysym 0xff13) is now reported as "pause" instead of - "break" (this is also consistent with the X key name). -- The numpad "delete" key is now reported as "delete" instead of "dec". diff --git a/doc/api/next_api_changes/behavior/17828-TAC.rst b/doc/api/next_api_changes/behavior/17828-TAC.rst deleted file mode 100644 index 5781f9088f82..000000000000 --- a/doc/api/next_api_changes/behavior/17828-TAC.rst +++ /dev/null @@ -1,20 +0,0 @@ -xunits=None and yunits=None passed as kwargs are treated as "no action" -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -Many (but not all) of the methods on `~.axes.Axes` take the (undocumented) -kwargs *xunits* and *yunits* that will update the units on the given -Axis by calling `.Axis.set_units` and `.Axis.update_units`. - -Previously if `None` was passed it would clear the value stored in -``.Axis.units`` which will in turn break converters (notably -`.StrCategoryConverter`) which rely on the value in -``.Axis.units`` to work properly. - -This changes the semantics of ``ax.meth(..., xunits=None, -yunits=None)`` from "please clear the units" to "do the default thing -as if they had not been passed" which is consistent with the standard -behavior of Matplotlib keyword arguments. - -If you were relying on passing ``xuints=None`` to plotting methods to -clear the ``.Axes.units`` attribute, directly call `.Axis.set_units` (and -`.Axis.update_units` if you also require the converter to be updated). diff --git a/doc/api/next_api_changes/behavior/17834-AL.rst b/doc/api/next_api_changes/behavior/17834-AL.rst deleted file mode 100644 index 027077dc1598..000000000000 --- a/doc/api/next_api_changes/behavior/17834-AL.rst +++ /dev/null @@ -1,5 +0,0 @@ -``Colorbar.dividers`` changes -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -This attribute is now always a `.LineCollection` -- an empty one if -``drawedges`` is False. Its default colors and linewidth (:rc:`axes.edgecolor`, -:rc:`axes.linewidth`) are now resolved at instantiation time, not at draw time. diff --git a/doc/api/next_api_changes/behavior/17897-KLP.rst b/doc/api/next_api_changes/behavior/17897-KLP.rst deleted file mode 100644 index f53534e8d1b9..000000000000 --- a/doc/api/next_api_changes/behavior/17897-KLP.rst +++ /dev/null @@ -1,11 +0,0 @@ -pyplot.specgram always uses origin='upper' -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -Previously if ``image.origin`` was set to something other than 'upper' or if the -``origin`` keyword argument was passed with a value other than 'upper', the spectrogram -itself would flip, but the axes would remain oriented for an origin value of 'upper', so -that the resulting plot was incorrectly labelled. - -Now, the ``origin`` keyword argument is not supported and the ``image.origin`` rcParam is -ignored. The function matplotlib.pyplot.specgram is forced to use ``origin='upper'``, so -that the axes are correct for the plotted spectrogram. diff --git a/doc/api/next_api_changes/behavior/17930-ES.rst b/doc/api/next_api_changes/behavior/17930-ES.rst deleted file mode 100644 index c42b95b6f52f..000000000000 --- a/doc/api/next_api_changes/behavior/17930-ES.rst +++ /dev/null @@ -1,8 +0,0 @@ -``Axes.errorbar`` cycles non-color properties correctly -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -Formerly, `.Axes.errorbar` incorrectly skipped the Axes property cycle if a -color was explicitly specified, even if the property cycler was for other -properties (such as line style). Now, `.Axes.errorbar` will advance the Axes -property cycle as done for `.Axes.plot`, i.e., as long as all properties in the -cycler are not explicitly passed. diff --git a/doc/api/next_api_changes/behavior/18127-ES.rst b/doc/api/next_api_changes/behavior/18127-ES.rst deleted file mode 100644 index 252796ab34ef..000000000000 --- a/doc/api/next_api_changes/behavior/18127-ES.rst +++ /dev/null @@ -1,11 +0,0 @@ -Autoscaling in Axes3D -~~~~~~~~~~~~~~~~~~~~~ - -In Matplotlib 3.2.0, autoscaling was made lazier for 2D Axes, i.e., limits -would only be recomputed when actually rendering the canvas, or when the user -queries the Axes limits. This performance improvement is now extended to -`.Axes3D`. This also fixes some issues with autoscaling being triggered -unexpectedly in Axes3D. - -Please see :ref:`the API change for 2D Axes ` -for further details. diff --git a/doc/api/next_api_changes/behavior/18172-IHI.rst b/doc/api/next_api_changes/behavior/18172-IHI.rst deleted file mode 100644 index 6a88acbeb71a..000000000000 --- a/doc/api/next_api_changes/behavior/18172-IHI.rst +++ /dev/null @@ -1,6 +0,0 @@ -webAgg backend no longer reports a middle click as a right click -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -Previously when using the webAgg backend the event passed to a callback -by ``fig.canvas.mpl_connect('mouse_button_event', callback)`` on a middle click -would report `.MouseButton.RIGHT` instead of `.MouseButton.MIDDLE` diff --git a/doc/api/next_api_changes/behavior/18193-BKB.rst b/doc/api/next_api_changes/behavior/18193-BKB.rst deleted file mode 100644 index 67cfc79bfa13..000000000000 --- a/doc/api/next_api_changes/behavior/18193-BKB.rst +++ /dev/null @@ -1,10 +0,0 @@ -ID attribute of XML tags in SVG files now based on SHA256 rather than MD5 -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -Matplotlib generates unique ID attributes for various tags in SVG files. -Matplotlib previously generated these unique IDs using the first 10 -characters of an MD5 hash. The MD5 hashing algorithm is not available in -Python on systems with Federal Information Processing Standards (FIPS) -enabled. Matplotlib now uses the first 10 characters of an SHA256 hash -instead. SVG files that would otherwise match those saved with earlier -versions of matplotlib, will have different ID attributes. diff --git a/doc/api/next_api_changes/behavior/18203-DS.rst b/doc/api/next_api_changes/behavior/18203-DS.rst deleted file mode 100644 index cf566f63f057..000000000000 --- a/doc/api/next_api_changes/behavior/18203-DS.rst +++ /dev/null @@ -1,5 +0,0 @@ -Locators and formatters -~~~~~~~~~~~~~~~~~~~~~~~ - -Axis locators and formatters must now be subclasses of -`~matplotlib.ticker.Locator` and `~matplotlib.ticker.Formatter` respectively. diff --git a/doc/api/next_api_changes/behavior/18320-ES.rst b/doc/api/next_api_changes/behavior/18320-ES.rst deleted file mode 100644 index c805b4ac40f6..000000000000 --- a/doc/api/next_api_changes/behavior/18320-ES.rst +++ /dev/null @@ -1,6 +0,0 @@ -``Colorbar`` outline is now a ``Spine`` -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -The outline of `~matplotlib.colorbar.Colorbar` is now a `.Spine` and drawn as -one, instead of a `.Polygon` drawn as an artist. This ensures it will always -be drawn after all artists, consistent with Spines on normal Axes. diff --git a/doc/api/next_api_changes/behavior/18440-AL.rst b/doc/api/next_api_changes/behavior/18440-AL.rst deleted file mode 100644 index 8b9447c969ab..000000000000 --- a/doc/api/next_api_changes/behavior/18440-AL.rst +++ /dev/null @@ -1,2 +0,0 @@ -docstring.Substitution now always dedents docstrings before string interpolation -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/doc/api/next_api_changes/behavior/18525-ES.rst b/doc/api/next_api_changes/behavior/18525-ES.rst deleted file mode 100644 index 457a9f1200d9..000000000000 --- a/doc/api/next_api_changes/behavior/18525-ES.rst +++ /dev/null @@ -1,5 +0,0 @@ -``mplot3d.art3d.get_dir_vector`` always returns NumPy arrays -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -For consistency, `~.mplot3d.art3d.get_dir_vector` now always returns NumPy -arrays, even if the input is a 3-element iterable. diff --git a/doc/api/next_api_changes/behavior/18532-AL.rst b/doc/api/next_api_changes/behavior/18532-AL.rst deleted file mode 100644 index 9d8042b0adc3..000000000000 --- a/doc/api/next_api_changes/behavior/18532-AL.rst +++ /dev/null @@ -1,4 +0,0 @@ -Consistent behavior of ``draw_if_interactive()`` across backends -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -`.pyplot.draw_if_interactive` no longer shows the window (if it was previously -unshown) on the tk and nbagg backends, consistently with all other backends. diff --git a/doc/api/next_api_changes/behavior/18560-AL.rst b/doc/api/next_api_changes/behavior/18560-AL.rst deleted file mode 100644 index abe54fa2e37e..000000000000 --- a/doc/api/next_api_changes/behavior/18560-AL.rst +++ /dev/null @@ -1,4 +0,0 @@ -Parasite Axes pcolor and pcolormesh now defaults to placing grid edges at integers, not half-integers -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -This is consistent with `~.Axes.pcolor` and `~.Axes.pcolormesh`. diff --git a/doc/api/next_api_changes/behavior/18564-AL.rst b/doc/api/next_api_changes/behavior/18564-AL.rst deleted file mode 100644 index 438949180e6c..000000000000 --- a/doc/api/next_api_changes/behavior/18564-AL.rst +++ /dev/null @@ -1,25 +0,0 @@ -Axes3D automatically adding self to Figure is deprecated -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -New `.Axes3D` objects previously added themselves to figures when they -were created, unlike all other Axes classes, which lead to them being -added twice if ``fig.add_subplot(111, projection='3d')`` was called. - -This behavior is now deprecated and will warn. The new keyword argument -*auto_add_to_figure* controls the behavior and can be used to suppress the -warning. The default value will change to False in mpl3.5, and any -non-False value will be an error in mpl3.6. - -In the future, `.Axes3D` will need to be explicitly added to the -figure :: - - fig = Figure() - # create Axes3D - ax = Axes3d(fig) - # add to Figure - fig.add_axes(ax) - -as needs to be done for other `.axes.Axes` sub-classes. Or, a 3-d -projection can be made via:: - - fig.add_subplot(projection='3d') diff --git a/doc/api/next_api_changes/behavior/18623-AL.rst b/doc/api/next_api_changes/behavior/18623-AL.rst deleted file mode 100644 index b6c3c1bddcbe..000000000000 --- a/doc/api/next_api_changes/behavior/18623-AL.rst +++ /dev/null @@ -1,8 +0,0 @@ -Changed cursive and fantasy font definitions -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -The Comic Sans and Comic Neue fonts were moved from the default :rc:`font.fantasy` -list to the default :rc:`font.cursive` setting, in accordance with the CSS -font families example_ and in order to provide a cursive font present in -Microsoft's Core Fonts set. - -.. _example: https://www.w3.org/Style/Examples/007/fonts.en.html diff --git a/doc/api/next_api_changes/behavior/18772-BGB.rst b/doc/api/next_api_changes/behavior/18772-BGB.rst deleted file mode 100644 index bf1536c5494b..000000000000 --- a/doc/api/next_api_changes/behavior/18772-BGB.rst +++ /dev/null @@ -1,12 +0,0 @@ -Annotations with ``annotation_clip`` no longer affect ``tight_layout`` -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -Previously, `.text.Annotation.get_tightbbox` always returned the full -`.text.Annotation.get_window_extent` of the object, independent of the value -of ``annotation_clip``. `.text.Annotation.get_tightbbox` now correctly takes -this extra clipping box into account, meaning that `~.text.Annotation`\s that -are not drawn because of ``annotation_clip`` will not count towards the axes -bounding box calculations, such as those done by `~.pyplot.tight_layout`. - -This is now consistent with the API described in `~.artist.Artist`, which -specifies that ``get_window_extent`` should return the full extents and -``get_tightbbox`` should "account for any clipping". diff --git a/doc/api/next_api_changes/behavior/18894-AL.rst b/doc/api/next_api_changes/behavior/18894-AL.rst deleted file mode 100644 index 06559d7705f4..000000000000 --- a/doc/api/next_api_changes/behavior/18894-AL.rst +++ /dev/null @@ -1,3 +0,0 @@ -``RendererPS.set_font`` is no longer a no-op in AFM mode -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -It now sets the current PostScript font in all cases. diff --git a/doc/api/next_api_changes/behavior/18989-TH.rst b/doc/api/next_api_changes/behavior/18989-TH.rst deleted file mode 100644 index d286e88da8cd..000000000000 --- a/doc/api/next_api_changes/behavior/18989-TH.rst +++ /dev/null @@ -1,5 +0,0 @@ -The Artist property *rasterized* cannot be *None* anymore -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -It is now a bool only. Before the default was *None* and -`.Artist.set_rasterized` documented to accept *None*. However, *None* did not -have a special meaning and was treated as *False*. diff --git a/doc/api/next_api_changes/behavior/19438-TAC.rst b/doc/api/next_api_changes/behavior/19438-TAC.rst deleted file mode 100644 index c491c3a30fbd..000000000000 --- a/doc/api/next_api_changes/behavior/19438-TAC.rst +++ /dev/null @@ -1,65 +0,0 @@ -``plt.subplot`` re-selection without keyword arguments -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -The purpose of `.pyplot.subplot` is to facilitate creating and re-selecting -Axes in a Figure when working strictly in the implicit pyplot API. When -creating new Axes it is possible to select the projection (e.g. polar, 3D, or -various cartographic projections) as well as to pass additional keyword -arguments through to the Axes-subclass that is created. - -The first time `.pyplot.subplot` is called for a given position in the Axes -grid it always creates and return a new Axes with the passed arguments and -projection (defaulting to a rectilinear). On subsequent calls to -`.pyplot.subplot` we have to determine if an existing Axes has equivalent -parameters, in which case in should be selected as the current Axes and -returned, or different parameters, in which case a new Axes is created and the -existing Axes is removed. This leaves the question of what is "equivalent -parameters". - -Previously it was the case that an existing Axes subclass, except for Axes3D, -would be considered equivalent to a 2D rectilinear Axes, despite having -different projections, if the kwargs (other than *projection*) matched. Thus -:: - - ax1 = plt.subplot(1, 1, 1, projection='polar') - ax2 = plt.subplots(1, 1, 1) - ax1 is ax2 - -We are embracing this long standing behavior to ensure that in the case when no -keyword arguments (of any sort) are passed to `.pyplot.subplot` any existing -Axes is returned, without consideration for keywords or projection used to -initially create it. This will cause a change in behavior when additional -keywords were passed to the original axes :: - - ax1 = plt.subplot(111, projection='polar', theta_offset=.75) - ax2 = plt.subplots(1, 1, 1) - ax1 is ax2 # new behavior - # ax1 is not ax2 # old behavior, made a new axes - - ax1 = plt.subplot(111, label='test') - ax2 = plt.subplots(1, 1, 1) - ax1 is ax2 # new behavior - # ax1 is not ax2 # old behavior, made a new axes - - -For the same reason, if there was an existing Axes that was not rectilinear, -passing ``projection='rectilinear'`` would reuse the existing Axes :: - - ax1 = plt.subplot(projection='polar') - ax2 = plt.subplot(projection='rectilinear') - ax1 is not ax2 # new behavior, makes new axes - # ax1 is ax2 # old behavior - - -contrary to the users request. - -Previously Axes3D could not be re-selected with `.pyplot.subplot` due to an -unrelated bug (also fixed in mpl3.4). While Axes3D are now consistent with all -other projections there is a change in behavior for :: - - plt.subplot(projection='3d') # create a 3D Axes - - plt.subplot() # now returns existing 3D Axes, but - # previously created new 2D Axes - - plt.subplot(projection='rectilinear') # to get a new 2D Axes diff --git a/doc/api/next_api_changes/behavior/8987-Z.rst b/doc/api/next_api_changes/behavior/8987-Z.rst deleted file mode 100644 index a76d5614cd07..000000000000 --- a/doc/api/next_api_changes/behavior/8987-Z.rst +++ /dev/null @@ -1,6 +0,0 @@ -``ScalarFormatter`` *useLocale* option obeys grouping -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -When the `~.ScalarFormatter` option *useLocale* is enabled (or -:rc:`axes.formatter.use_locale` is *True*) and the configured locale uses -grouping, a separator will be added as described in `locale.format_string`. diff --git a/doc/api/prev_api_changes/api_changes_3.4.0.rst b/doc/api/prev_api_changes/api_changes_3.4.0.rst index bd47331a8988..ebd17cd1f2db 100644 --- a/doc/api/prev_api_changes/api_changes_3.4.0.rst +++ b/doc/api/prev_api_changes/api_changes_3.4.0.rst @@ -5,6 +5,8 @@ API Changes for 3.4.0 :local: :depth: 1 +.. include:: /api/prev_api_changes/api_changes_3.4.0/behaviour.rst + .. include:: /api/prev_api_changes/api_changes_3.4.0/removals.rst .. include:: /api/prev_api_changes/api_changes_3.4.0/development.rst diff --git a/doc/api/prev_api_changes/api_changes_3.4.0/behaviour.rst b/doc/api/prev_api_changes/api_changes_3.4.0/behaviour.rst new file mode 100644 index 000000000000..f6d6459be8f1 --- /dev/null +++ b/doc/api/prev_api_changes/api_changes_3.4.0/behaviour.rst @@ -0,0 +1,353 @@ +Behaviour changes +----------------- + +Constrained layout rewrite +~~~~~~~~~~~~~~~~~~~~~~~~~~ + +The layout manager ``constrained_layout`` was re-written with different outer +constraints that should be more robust to complicated subplot layouts. +User-facing changes are: + +- some poorly constrained layouts will have different width/height plots than + before. +- colorbars now respect the ``anchor`` keyword argument of + `matplotlib.colorbar.make_axes` +- colorbars are wider. +- colorbars in different rows or columns line up more robustly. +- *hspace* and *wspace* options to `.Figure.set_constrained_layout_pads` were + twice as wide as the docs said they should be. So these now follow the docs. + +This feature will remain "experimental" until the new changes have been used +enough by users, so we anticipate version 3.5 or 3.6. On the other hand, +``constrained_layout`` is extensively tested and used in examples in the +library, so using it should be safe, but layouts may not be exactly the same as +more development takes place. + +Details of using ``constrained_layout``, and its algorithm are available at +:doc:`/tutorials/intermediate/constrainedlayout_guide` + +``plt.subplot`` re-selection without keyword arguments +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +The purpose of `.pyplot.subplot` is to facilitate creating and re-selecting +Axes in a Figure when working strictly in the implicit pyplot API. When +creating new Axes it is possible to select the projection (e.g. polar, 3D, or +various cartographic projections) as well as to pass additional keyword +arguments through to the Axes-subclass that is created. + +The first time `.pyplot.subplot` is called for a given position in the Axes +grid it always creates and returns a new Axes with the passed arguments and +projection (defaulting to rectilinear). On subsequent calls to +`.pyplot.subplot` we have to determine if an existing Axes has a) equivalent +parameters, in which case it should be selected as the current Axes and +returned, or b) different parameters, in which case a new Axes is created and +the existing Axes is removed. This leaves the question of what is "equivalent +parameters". + +Previously it was the case that an existing Axes subclass, except for Axes3D, +would be considered equivalent to a 2D rectilinear Axes, despite having +different projections, if the keyword arguments (other than *projection*) +matched. Thus:: + + ax1 = plt.subplot(1, 1, 1, projection='polar') + ax2 = plt.subplots(1, 1, 1) + ax1 is ax2 + +We are embracing this long standing behavior to ensure that in the case when no +keyword arguments (of any sort) are passed to `.pyplot.subplot` any existing +Axes is returned, without consideration for keywords or projection used to +initially create it. This will cause a change in behavior when additional +keywords were passed to the original Axes:: + + ax1 = plt.subplot(111, projection='polar', theta_offset=.75) + ax2 = plt.subplots(1, 1, 1) + ax1 is ax2 # new behavior + # ax1 is not ax2 # old behavior, made a new axes + + ax1 = plt.subplot(111, label='test') + ax2 = plt.subplots(1, 1, 1) + ax1 is ax2 # new behavior + # ax1 is not ax2 # old behavior, made a new axes + +For the same reason, if there was an existing Axes that was not rectilinear, +passing ``projection='rectilinear'`` would reuse the existing Axes :: + + ax1 = plt.subplot(projection='polar') + ax2 = plt.subplot(projection='rectilinear') + ax1 is not ax2 # new behavior, makes new Axes + # ax1 is ax2 # old behavior + +contrary to the user's request. + +Previously Axes3D could not be re-selected with `.pyplot.subplot` due to an +unrelated bug (also fixed in Matplotlib 3.4). While Axes3D are now consistent +with all other projections there is a change in behavior for :: + + plt.subplot(projection='3d') # create a 3D Axes + + plt.subplot() # now returns existing 3D Axes, but + # previously created new 2D Axes + + plt.subplot(projection='rectilinear') # to get a new 2D Axes + +``ioff`` and ``ion`` can be used as context managers +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +`.pyplot.ion` and `.pyplot.ioff` may now be used as context managers to create +a context with interactive mode on or off, respectively. The old behavior of +calling these functions is maintained. To use the new functionality call as:: + + with plt.ioff(): + # non-interactive code + +Locators and formatters must be in the class hierarchy +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Axis locators and formatters must now be subclasses of +`~matplotlib.ticker.Locator` and `~matplotlib.ticker.Formatter` respectively. + +Date locator for DAILY interval now returns middle of month +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +The `matplotlib.dates.AutoDateLocator` has a default of +``interval_multiples=True`` that attempts to align ticks with the start of +meaningful intervals like the start of the month, or start of the day, etc. +That lead to approximately 140-day intervals being mapped to the first and 22nd +of the month. This has now been changed so that it chooses the first and 15th +of the month, which is probably what most people want. + +``ScalarFormatter`` *useLocale* option obeys grouping +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +When the `~.ScalarFormatter` option *useLocale* is enabled (or +:rc:`axes.formatter.use_locale` is *True*) and the configured locale uses +grouping, a separator will be added as described in `locale.format_string`. + +``Axes.errorbar`` cycles non-color properties correctly +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Formerly, `.Axes.errorbar` incorrectly skipped the Axes property cycle if a +color was explicitly specified, even if the property cycler was for other +properties (such as line style). Now, `.Axes.errorbar` will advance the Axes +property cycle as done for `.Axes.plot`, i.e., as long as all properties in the +cycler are not explicitly passed. + +pyplot.specgram always uses origin='upper' +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Previously if :rc:`image.origin` was set to something other than ``'upper'`` or +if the *origin* keyword argument was passed with a value other than +``'upper'``, the spectrogram itself would flip, but the Axes would remain +oriented for an origin value of ``'upper'``, so that the resulting plot was +incorrectly labelled. + +Now, the *origin* keyword argument is not supported and the ``image.origin`` +rcParam is ignored. The function `matplotlib.pyplot.specgram` is forced to use +``origin='upper'``, so that the Axes are correct for the plotted spectrogram. + +xunits=None and yunits=None passed as keyword arguments are treated as "no action" +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Many (but not all) of the methods on `~.axes.Axes` take the (undocumented) +keyword arguments *xunits* and *yunits* that will update the units on the given +Axis by calling `.Axis.set_units` and `.Axis.update_units`. + +Previously if *None* was passed it would clear the value stored in +``.Axis.units`` which will in turn break converters which rely on the value in +``.Axis.units`` to work properly (notably `.StrCategoryConverter`). + +This changes the semantics of ``ax.meth(..., xunits=None, yunits=None)`` from +"please clear the units" to "do the default thing as if they had not been +passed" which is consistent with the standard behavior of Matplotlib keyword +arguments. + +If you were relying on passing ``xunits=None`` to plotting methods to clear the +``.Axes.units`` attribute, directly call `.Axis.set_units` (and +`.Axis.update_units` if you also require the converter to be updated). + +Annotations with ``annotation_clip`` no longer affect ``tight_layout`` +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Previously, `.text.Annotation.get_tightbbox` always returned the full +`.text.Annotation.get_window_extent` of the object, independent of the value of +``annotation_clip``. `.text.Annotation.get_tightbbox` now correctly takes this +extra clipping box into account, meaning that `~.text.Annotation`\s that are +not drawn because of ``annotation_clip`` will not count towards the Axes +bounding box calculations, such as those done by `~.pyplot.tight_layout`. + +This is now consistent with the API described in `~.artist.Artist`, which +specifies that ``get_window_extent`` should return the full extents and +``get_tightbbox`` should "account for any clipping". + +Parasite Axes pcolor and pcolormesh now defaults to placing grid edges at integers, not half-integers +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +This is consistent with `~.Axes.pcolor` and `~.Axes.pcolormesh`. + +``Colorbar`` outline is now a ``Spine`` +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +The outline of `~matplotlib.colorbar.Colorbar` is now a `.Spine` and drawn as +one, instead of a `.Polygon` drawn as an artist. This ensures it will always be +drawn after (i.e., on top of) all artists, consistent with Spines on normal +Axes. + +``Colorbar.dividers`` changes +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +This attribute is now always a `.LineCollection` -- an empty one if +``drawedges`` is *False*. Its default colors and linewidth +(:rc:`axes.edgecolor`, :rc:`axes.linewidth`) are now resolved at instantiation +time, not at draw time. + +Raise or warn on registering a colormap twice +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +When using `matplotlib.cm.register_cmap` to register a user provided or +third-party colormap it will now raise a `ValueError` if trying to over-write +one of the built in colormaps and warn if trying to over write a user +registered colormap. This may raise for user-registered colormaps in the +future. + +Consecutive rasterized draws now merged +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Tracking of depth of raster draws has moved from +`.backend_mixed.MixedModeRenderer.start_rasterizing` and +`.backend_mixed.MixedModeRenderer.stop_rasterizing` into +`.artist.allow_rasterization`. This means the start and stop functions are only +called when the rasterization actually needs to be started and stopped. + +The output of vector backends will change in the case that rasterized elements +are merged. This should not change the appearance of outputs. + +The renders in 3rd party backends are now expected to have +``self._raster_depth`` and ``self._rasterizing`` initialized to ``0`` and +*False* respectively. + +Consistent behavior of ``draw_if_interactive()`` across backends +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +`.pyplot.draw_if_interactive` no longer shows the window (if it was previously +unshown) on the Tk and nbAgg backends, consistently with all other backends. + +The Artist property *rasterized* cannot be *None* anymore +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +It is now a boolean only. Before the default was *None* and +`.Artist.set_rasterized` was documented to accept *None*. However, *None* did +not have a special meaning and was treated as *False*. + +Canvas's callback registry now stored on Figure +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +The canonical location of the `~.cbook.CallbackRegistry` used to handle +Figure/Canvas events has been moved from the Canvas to the Figure. This change +should be transparent to almost all users, however if you are swapping +switching the Figure out from on top of a Canvas or visa versa you may see a +change in behavior. + +Harmonized key event data across backends +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +The different backends with key translation support, now handle "Shift" as a +sometimes modifier, where the ``'shift+'`` prefix won't be added if a key +translation was made. + +In the Qt5 backend, the ``matplotlib.backends.backend_qt5.SPECIAL_KEYS`` +dictionary contains keys that do *not* return their unicode name instead they +have manually specified names. The name for ``QtCore.Qt.Key_Meta`` has changed +to ``'meta'`` to be consistent with the other GUI backends. + +The WebAgg backend now handles key translations correctly on non-US keyboard +layouts. + +In the GTK and Tk backends, the handling of non-ASCII keypresses (as reported +in the KeyEvent passed to ``key_press_event``-handlers) now correctly reports +Unicode characters (e.g., €), and better respects NumLock on the numpad. + +In the GTK and Tk backends, the following key names have changed; the new names +are consistent with those reported by the Qt backends: + +- The "Break/Pause" key (keysym 0xff13) is now reported as ``"pause"`` instead + of ``"break"`` (this is also consistent with the X key name). +- The numpad "delete" key is now reported as ``"delete"`` instead of ``"dec"``. + +WebAgg backend no longer reports a middle click as a right click +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Previously when using the WebAgg backend the event passed to a callback by +``fig.canvas.mpl_connect('mouse_button_event', callback)`` on a middle click +would report `.MouseButton.RIGHT` instead of `.MouseButton.MIDDLE`. + +ID attribute of XML tags in SVG files now based on SHA256 rather than MD5 +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Matplotlib generates unique ID attributes for various tags in SVG files. +Matplotlib previously generated these unique IDs using the first 10 characters +of an MD5 hash. The MD5 hashing algorithm is not available in Python on systems +with Federal Information Processing Standards (FIPS) enabled. Matplotlib now +uses the first 10 characters of an SHA256 hash instead. SVG files that would +otherwise match those saved with earlier versions of matplotlib, will have +different ID attributes. + +``RendererPS.set_font`` is no longer a no-op in AFM mode +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +`.RendererPS.set_font` now sets the current PostScript font in all cases. + +Autoscaling in Axes3D +~~~~~~~~~~~~~~~~~~~~~ + +In Matplotlib 3.2.0, autoscaling was made lazier for 2D Axes, i.e., limits +would only be recomputed when actually rendering the canvas, or when the user +queries the Axes limits. This performance improvement is now extended to +`.Axes3D`. This also fixes some issues with autoscaling being triggered +unexpectedly in Axes3D. + +Please see :ref:`the API change for 2D Axes ` +for further details. + +Axes3D automatically adding itself to Figure is deprecated +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +New `.Axes3D` objects previously added themselves to figures when they were +created, unlike all other Axes classes, which lead to them being added twice if +``fig.add_subplot(111, projection='3d')`` was called. + +This behavior is now deprecated and will warn. The new keyword argument +*auto_add_to_figure* controls the behavior and can be used to suppress the +warning. The default value will change to *False* in Matplotlib 3.5, and any +non-*False* value will be an error in Matplotlib 3.6. + +In the future, `.Axes3D` will need to be explicitly added to the figure :: + + fig = Figure() + # create Axes3D + ax = Axes3d(fig) + # add to Figure + fig.add_axes(ax) + +as needs to be done for other `.axes.Axes` sub-classes. Or, a 3D projection can +be made via:: + + fig.add_subplot(projection='3d') + +``mplot3d.art3d.get_dir_vector`` always returns NumPy arrays +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +For consistency, `~.mplot3d.art3d.get_dir_vector` now always returns NumPy +arrays, even if the input is a 3-element iterable. + +Changed cursive and fantasy font definitions +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +The Comic Sans and Comic Neue fonts were moved from the default +:rc:`font.fantasy` list to the default :rc:`font.cursive` setting, in +accordance with the CSS font families example_ and in order to provide a +cursive font present in Microsoft's Core Fonts set. + +.. _example: https://www.w3.org/Style/Examples/007/fonts.en.html + +docstring.Substitution now always dedents docstrings before string interpolation +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ From 4822f7dd95b2cda69939e13468e111fa424717cb Mon Sep 17 00:00:00 2001 From: Elliott Sales de Andrade Date: Fri, 12 Mar 2021 05:04:57 -0500 Subject: [PATCH 5/6] DOC: Move 3.4.0 deprecation docs to final location. --- .../deprecations/00009-AL.rst | 19 - .../deprecations/12443-AL.rst | 8 - .../deprecations/17662-TAC.rst | 22 -- .../deprecations/17684-AL.rst | 3 - .../deprecations/17737-AL.rst | 6 - .../deprecations/17788-AL.rst | 3 - .../deprecations/17926-ES.rst | 5 - .../deprecations/18002-AL.rst | 11 - .../deprecations/18003-AL.rst | 3 - .../deprecations/18004-AL.rst | 4 - .../deprecations/18226-ES.rst | 12 - .../deprecations/18302-ES.rst | 26 -- .../deprecations/18378-AL.rst | 9 - .../deprecations/18527-AL.rst | 4 - .../deprecations/18528-AL.rst | 5 - .../deprecations/18564-AL.rst | 19 - .../deprecations/18591-AL.rst | 24 -- .../deprecations/18649-TH.rst | 7 - .../deprecations/18657-TH.rst | 12 - .../deprecations/18673-AL.rst | 3 - .../deprecations/18675-AL.rst | 11 - .../deprecations/18679-AL.rst | 3 - .../deprecations/18680-AL.rst | 8 - .../deprecations/18682-AL.rst | 4 - .../deprecations/18687-AL.rst | 3 - .../deprecations/18710-TH.rst | 3 - .../deprecations/18798-JKS.rst | 8 - .../deprecations/18817-BGB.rst | 3 - .../deprecations/18949-TH.rst | 3 - .../deprecations/19008-AL.rst | 5 - .../deprecations/19018-AL.rst | 3 - .../deprecations/19019-AL.rst | 5 - .../deprecations/19042-AL.rst | 5 - .../deprecations/19046-AL.rst | 5 - .../deprecations/19153-LPS.rst | 5 - .../deprecations/19176-AL.rst | 5 - .../deprecations/19336-AL.rst | 3 - .../deprecations/19341-TH.rst | 5 - .../deprecations/19503-AL.rst | 6 - .../prev_api_changes/api_changes_3.4.0.rst | 2 + .../api_changes_3.4.0/deprecations.rst | 354 ++++++++++++++++++ .../api_changes_3.4.0/development.rst | 22 +- 42 files changed, 376 insertions(+), 300 deletions(-) delete mode 100644 doc/api/next_api_changes/deprecations/00009-AL.rst delete mode 100644 doc/api/next_api_changes/deprecations/12443-AL.rst delete mode 100644 doc/api/next_api_changes/deprecations/17662-TAC.rst delete mode 100644 doc/api/next_api_changes/deprecations/17684-AL.rst delete mode 100644 doc/api/next_api_changes/deprecations/17737-AL.rst delete mode 100644 doc/api/next_api_changes/deprecations/17788-AL.rst delete mode 100644 doc/api/next_api_changes/deprecations/17926-ES.rst delete mode 100644 doc/api/next_api_changes/deprecations/18002-AL.rst delete mode 100644 doc/api/next_api_changes/deprecations/18003-AL.rst delete mode 100644 doc/api/next_api_changes/deprecations/18004-AL.rst delete mode 100644 doc/api/next_api_changes/deprecations/18226-ES.rst delete mode 100644 doc/api/next_api_changes/deprecations/18302-ES.rst delete mode 100644 doc/api/next_api_changes/deprecations/18378-AL.rst delete mode 100644 doc/api/next_api_changes/deprecations/18527-AL.rst delete mode 100644 doc/api/next_api_changes/deprecations/18528-AL.rst delete mode 100644 doc/api/next_api_changes/deprecations/18564-AL.rst delete mode 100644 doc/api/next_api_changes/deprecations/18591-AL.rst delete mode 100644 doc/api/next_api_changes/deprecations/18649-TH.rst delete mode 100644 doc/api/next_api_changes/deprecations/18657-TH.rst delete mode 100644 doc/api/next_api_changes/deprecations/18673-AL.rst delete mode 100644 doc/api/next_api_changes/deprecations/18675-AL.rst delete mode 100644 doc/api/next_api_changes/deprecations/18679-AL.rst delete mode 100644 doc/api/next_api_changes/deprecations/18680-AL.rst delete mode 100644 doc/api/next_api_changes/deprecations/18682-AL.rst delete mode 100644 doc/api/next_api_changes/deprecations/18687-AL.rst delete mode 100644 doc/api/next_api_changes/deprecations/18710-TH.rst delete mode 100644 doc/api/next_api_changes/deprecations/18798-JKS.rst delete mode 100644 doc/api/next_api_changes/deprecations/18817-BGB.rst delete mode 100644 doc/api/next_api_changes/deprecations/18949-TH.rst delete mode 100644 doc/api/next_api_changes/deprecations/19008-AL.rst delete mode 100644 doc/api/next_api_changes/deprecations/19018-AL.rst delete mode 100644 doc/api/next_api_changes/deprecations/19019-AL.rst delete mode 100644 doc/api/next_api_changes/deprecations/19042-AL.rst delete mode 100644 doc/api/next_api_changes/deprecations/19046-AL.rst delete mode 100644 doc/api/next_api_changes/deprecations/19153-LPS.rst delete mode 100644 doc/api/next_api_changes/deprecations/19176-AL.rst delete mode 100644 doc/api/next_api_changes/deprecations/19336-AL.rst delete mode 100644 doc/api/next_api_changes/deprecations/19341-TH.rst delete mode 100644 doc/api/next_api_changes/deprecations/19503-AL.rst create mode 100644 doc/api/prev_api_changes/api_changes_3.4.0/deprecations.rst diff --git a/doc/api/next_api_changes/deprecations/00009-AL.rst b/doc/api/next_api_changes/deprecations/00009-AL.rst deleted file mode 100644 index db8fbfd80f0c..000000000000 --- a/doc/api/next_api_changes/deprecations/00009-AL.rst +++ /dev/null @@ -1,19 +0,0 @@ -``dpi_cor`` property of `.FancyArrowPatch` -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -This parameter is considered internal and deprecated. - -Colorbar docstrings -~~~~~~~~~~~~~~~~~~~ -The following globals in :mod:`matplotlib.colorbar` are deprecated: -``colorbar_doc``, ``colormap_kw_doc``, ``make_axes_kw_doc``. - -``FancyBboxPatch(..., boxstyle="custom", bbox_transmuter=...)`` -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -In order to use a custom boxstyle, directly pass it as the *boxstyle* argument -to `.FancyBboxPatch`. This was previously already possible, and is consistent -with custom arrow styles and connection styles. - -``FigureCanvasBase.get_window_title`` and ``FigureCanvasBase.set_window_title`` -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -... are deprecated. Use the corresponding methods on the FigureManager if -using pyplot, or GUI-specific methods if embedding. diff --git a/doc/api/next_api_changes/deprecations/12443-AL.rst b/doc/api/next_api_changes/deprecations/12443-AL.rst deleted file mode 100644 index cc1b6bac2c04..000000000000 --- a/doc/api/next_api_changes/deprecations/12443-AL.rst +++ /dev/null @@ -1,8 +0,0 @@ -``colorbar`` now warns when the mappable's axes is different from the current axes -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -Currently, `.Figure.colorbar` and `.pyplot.colorbar` steal space by default -from the current axes to place the colorbar. In a future version, they will -steal space from the mappable's axes instead. In preparation for this change, -`.Figure.colorbar` and `.pyplot.colorbar` now emits a warning when the current -axes is not the same as the mappable's axes. diff --git a/doc/api/next_api_changes/deprecations/17662-TAC.rst b/doc/api/next_api_changes/deprecations/17662-TAC.rst deleted file mode 100644 index 7fdfce7977cb..000000000000 --- a/doc/api/next_api_changes/deprecations/17662-TAC.rst +++ /dev/null @@ -1,22 +0,0 @@ -Increase minimum supported versions of Python and dependencies -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - - -For Maptlotlib 3.4 the :ref:`minimum supported versions ` -are being bumped - -+------------+-----------------+---------------+ -| Dependency | min in mpl3.3 | min in mpl3.4 | -+============+=================+===============+ -| Python | 3.6 | 3.7 | -+------------+-----------------+---------------+ -| dateutil | 2.1 | 2.2.1 | -+------------+-----------------+---------------+ -| numpy | 1.15 | 1.16 | -+------------+-----------------+---------------+ -| pyparsing | 2.0.3 | 2.2.1 | -+------------+-----------------+---------------+ - - -This consistent with our :ref:`min_deps_policy` and `NEP29 -`__ diff --git a/doc/api/next_api_changes/deprecations/17684-AL.rst b/doc/api/next_api_changes/deprecations/17684-AL.rst deleted file mode 100644 index 10923c0d50d5..000000000000 --- a/doc/api/next_api_changes/deprecations/17684-AL.rst +++ /dev/null @@ -1,3 +0,0 @@ -Passing `bytes` to ``FT2Font.set_text`` -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -... is deprecated, pass `str` instead. diff --git a/doc/api/next_api_changes/deprecations/17737-AL.rst b/doc/api/next_api_changes/deprecations/17737-AL.rst deleted file mode 100644 index 1757a8563639..000000000000 --- a/doc/api/next_api_changes/deprecations/17737-AL.rst +++ /dev/null @@ -1,6 +0,0 @@ -BoxStyles are now called without passing the *mutation_aspect* parameter -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -Mutation aspect is now handled by the artist itself. Hence the -*mutation_aspect* parameter of ``BoxStyle._Base.__call__`` is deprecated, and -custom boxstyles should be implemented to not require this parameter (it can be -left as a parameter defaulting to 1 for back-compatibility). diff --git a/doc/api/next_api_changes/deprecations/17788-AL.rst b/doc/api/next_api_changes/deprecations/17788-AL.rst deleted file mode 100644 index 7f4acc9894e0..000000000000 --- a/doc/api/next_api_changes/deprecations/17788-AL.rst +++ /dev/null @@ -1,3 +0,0 @@ -``RendererAgg.get_content_extents``, ``RendererAgg.tostring_rgba_minimized`` -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -... are deprecated. diff --git a/doc/api/next_api_changes/deprecations/17926-ES.rst b/doc/api/next_api_changes/deprecations/17926-ES.rst deleted file mode 100644 index 598737c7457a..000000000000 --- a/doc/api/next_api_changes/deprecations/17926-ES.rst +++ /dev/null @@ -1,5 +0,0 @@ -Invalid hatch pattern characters are no longer ignored -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -When specifying hatching patterns, characters that are not recognized will -raise a DeprecationWarning. In the future, this will become a hard error. diff --git a/doc/api/next_api_changes/deprecations/18002-AL.rst b/doc/api/next_api_changes/deprecations/18002-AL.rst deleted file mode 100644 index a61429712401..000000000000 --- a/doc/api/next_api_changes/deprecations/18002-AL.rst +++ /dev/null @@ -1,11 +0,0 @@ -Deprecation of various mathtext helpers -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -The ``MathtextBackendPdf``, ``MathtextBackendPs``, ``MathtextBackendSvg``, -and ``MathtextBackendCairo`` classes from the :mod:`.mathtext` module, as -well as the corresponding ``.mathtext_parser`` attributes on ``RendererPdf``, -``RendererPS``, ``RendererSVG``, and ``RendererCairo``, are deprecated. The -``MathtextBackendPath`` class can be used to obtain a list of glyphs and -rectangles in a mathtext expression, and renderer-specific logic should be -directly implemented in the renderer. - -``StandardPsFonts.pswriter`` is unused and deprecated. diff --git a/doc/api/next_api_changes/deprecations/18003-AL.rst b/doc/api/next_api_changes/deprecations/18003-AL.rst deleted file mode 100644 index c5c941e784ca..000000000000 --- a/doc/api/next_api_changes/deprecations/18003-AL.rst +++ /dev/null @@ -1,3 +0,0 @@ -mathtext.Fonts.destroy -~~~~~~~~~~~~~~~~~~~~~~ -... is deprecated, because Fonts do not create reference loops anyways. diff --git a/doc/api/next_api_changes/deprecations/18004-AL.rst b/doc/api/next_api_changes/deprecations/18004-AL.rst deleted file mode 100644 index fbdb4e6ff958..000000000000 --- a/doc/api/next_api_changes/deprecations/18004-AL.rst +++ /dev/null @@ -1,4 +0,0 @@ -*facename* parameter of ``mathtext.Fonts.render_glyph`` -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -This parameter was renamed to *font* for consistency with the rest of the -``Fonts`` API. diff --git a/doc/api/next_api_changes/deprecations/18226-ES.rst b/doc/api/next_api_changes/deprecations/18226-ES.rst deleted file mode 100644 index ad85203d7876..000000000000 --- a/doc/api/next_api_changes/deprecations/18226-ES.rst +++ /dev/null @@ -1,12 +0,0 @@ -Widget class internals -~~~~~~~~~~~~~~~~~~~~~~ - -Several `.widgets.Widget` class internals have been privatized and deprecated: - -* ``AxesWidget.cids`` -* ``Button.cnt`` and ``Button.observers`` -* ``CheckButtons.cnt`` and ``CheckButtons.observers`` -* ``RadioButtons.cnt`` and ``RadioButtons.observers`` -* ``Slider.cnt`` and ``Slider.observers`` -* ``TextBox.cnt``, ``TextBox.change_observers`` and - ``TextBox.submit_observers`` diff --git a/doc/api/next_api_changes/deprecations/18302-ES.rst b/doc/api/next_api_changes/deprecations/18302-ES.rst deleted file mode 100644 index 6a72743e8302..000000000000 --- a/doc/api/next_api_changes/deprecations/18302-ES.rst +++ /dev/null @@ -1,26 +0,0 @@ -3D properties on renderers -~~~~~~~~~~~~~~~~~~~~~~~~~~ - -The properties of the 3D Axes that were placed on the Renderer during draw are -now deprecated: - -* ``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. - -*renderer* argument of ``do_3d_projection`` method for ``Collection3D``/``Patch3D`` -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -The *renderer* argument for the ``do_3d_projection`` method on ``Collection3D`` -and ``Patch3D`` is no longer necessary, and passing it during draw is -deprecated. - -*project* argument of ``draw`` method for ``Line3DCollection`` -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -The *project* argument for the ``draw`` method on ``Line3DCollection`` is -deprecated. Call `.Line3DCollection.do_3d_projection` explicitly instead. diff --git a/doc/api/next_api_changes/deprecations/18378-AL.rst b/doc/api/next_api_changes/deprecations/18378-AL.rst deleted file mode 100644 index ce9ace65981e..000000000000 --- a/doc/api/next_api_changes/deprecations/18378-AL.rst +++ /dev/null @@ -1,9 +0,0 @@ -Deprecation of mathtext internals -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -The following API elements previously exposed by the :mod:`.mathtext` module -are considered to be implementation details of and public access to them is -deprecated: ``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``. diff --git a/doc/api/next_api_changes/deprecations/18527-AL.rst b/doc/api/next_api_changes/deprecations/18527-AL.rst deleted file mode 100644 index 3fca934bbf3b..000000000000 --- a/doc/api/next_api_changes/deprecations/18527-AL.rst +++ /dev/null @@ -1,4 +0,0 @@ -``ColorbarPatch`` and ``colorbar_factory`` are deprecated -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -All the relevant functionality has been moved to the -`~matplotlib.colorbar.Colorbar` class. diff --git a/doc/api/next_api_changes/deprecations/18528-AL.rst b/doc/api/next_api_changes/deprecations/18528-AL.rst deleted file mode 100644 index 73674f8611b0..000000000000 --- a/doc/api/next_api_changes/deprecations/18528-AL.rst +++ /dev/null @@ -1,5 +0,0 @@ -*minimumdescent* parameter/property of ``TextArea`` -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -`.offsetbox.TextArea` has behaved as if *minimumdescent* was always True -(regardless of the value to which it was set) since Matplotlib 1.3, so the -parameter/property is deprecated. diff --git a/doc/api/next_api_changes/deprecations/18564-AL.rst b/doc/api/next_api_changes/deprecations/18564-AL.rst deleted file mode 100644 index d4e38763a196..000000000000 --- a/doc/api/next_api_changes/deprecations/18564-AL.rst +++ /dev/null @@ -1,19 +0,0 @@ -Subplot-related attributes and methods -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -Some ``SubplotBase`` methods and attributes have been deprecated and/or moved -to `.SubplotSpec`: ``get_geometry`` (use `.SubplotBase.get_subplotspec` -instead), ``change_geometry`` (use `.SubplotBase.set_subplotspec` -instead), ``is_first_row``, ``is_last_row``, ``is_first_col``, -``is_last_col`` (use the corresponding methods on the `.SubplotSpec` -instance instead), ``update_params`` (now a no-op), ``figbox`` (use -``ax.get_subplotspec().get_geometry(ax.figure)`` instead to recompute -the geometry, or ``ax.get_position()`` to read its current value), -``numRows``, ``numCols`` (use the ``nrows`` and ``ncols`` attribute on the -`.GridSpec` instead). Likewise, the ``get_geometry``, ``change_geometry``, -``update_params``, and ``figbox`` methods/attributes of `.SubplotDivider` have -been deprecated, with similar replacements. - -Axes constructor -~~~~~~~~~~~~~~~~ -Parameters of the Axes constructor other than *fig* and *rect* will become -keyword-only in a future version. diff --git a/doc/api/next_api_changes/deprecations/18591-AL.rst b/doc/api/next_api_changes/deprecations/18591-AL.rst deleted file mode 100644 index 67398d5196fc..000000000000 --- a/doc/api/next_api_changes/deprecations/18591-AL.rst +++ /dev/null @@ -1,24 +0,0 @@ -``MathTextParser("bitmap")`` is deprecated -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -The associated APIs ``MathtextBackendBitmap``, ``MathTextParser.to_mask``, -``MathTextParser.to_rgba``, ``MathTextParser.to_png``, and -``MathTextParser.get_depth`` are likewise deprecated. - -To convert a text string to an image, either directly draw the text to an -empty `.Figure` and save the figure using a tight bbox, as demonstrated in -:doc:`/gallery/text_labels_and_annotations/mathtext_asarray`, or use -`.mathtext.math_to_image`. - -When using `.math_to_image`, text color can be set with e.g.:: - - with plt.rc_context({"text.color": "tab:blue"}): - mathtext.math_to_image(text, filename) - -and an RGBA array can be obtained with e.g.:: - - from io import BytesIO - buf = BytesIO() - mathtext.math_to_image(text, buf, format="png") - buf.seek(0) - rgba = plt.imread(buf) diff --git a/doc/api/next_api_changes/deprecations/18649-TH.rst b/doc/api/next_api_changes/deprecations/18649-TH.rst deleted file mode 100644 index 7d73d9bbe362..000000000000 --- a/doc/api/next_api_changes/deprecations/18649-TH.rst +++ /dev/null @@ -1,7 +0,0 @@ -``imread()`` reading from URLs -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -Passing a URL to `~.pyplot.imread()` is deprecated. 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. diff --git a/doc/api/next_api_changes/deprecations/18657-TH.rst b/doc/api/next_api_changes/deprecations/18657-TH.rst deleted file mode 100644 index d6e07e879041..000000000000 --- a/doc/api/next_api_changes/deprecations/18657-TH.rst +++ /dev/null @@ -1,12 +0,0 @@ -Deprecation-related functionality is considered internal -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -The module ``matplotlib.cbook.deprecation`` is considered internal and will be -removed from the public API. This also holds for deprecation-related re-imports -in ``matplotlib.cbook``, i.e. ``matplotlib.cbook.deprecated()``, -``matplotlib.cbook.warn_deprecated()``, -``matplotlib.cbook.MatplotlibDeprecationWarning`` and -``matplotlib.cbook.mplDeprecation``. - -If needed, external users may import ``MatplotlibDeprecationWarning`` directly -from the ``matplotlib`` namespace. ``mplDeprecation`` is only an alias of -``MatplotlibDeprecationWarning`` and should not be used anymore. \ No newline at end of file diff --git a/doc/api/next_api_changes/deprecations/18673-AL.rst b/doc/api/next_api_changes/deprecations/18673-AL.rst deleted file mode 100644 index f641ca3daedc..000000000000 --- a/doc/api/next_api_changes/deprecations/18673-AL.rst +++ /dev/null @@ -1,3 +0,0 @@ -``ParasiteAxesAuxTransBase.update_viewlim`` -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -... is deprecated; use ``apply_aspect`` instead. diff --git a/doc/api/next_api_changes/deprecations/18675-AL.rst b/doc/api/next_api_changes/deprecations/18675-AL.rst deleted file mode 100644 index a41dbd5979e4..000000000000 --- a/doc/api/next_api_changes/deprecations/18675-AL.rst +++ /dev/null @@ -1,11 +0,0 @@ -ParasiteAxesAuxTransBase -~~~~~~~~~~~~~~~~~~~~~~~~ -The functionality of that mixin class has been moved to the base -``ParasiteAxesBase`` class. Thus, ``ParasiteAxesAuxTransBase``, -``ParasiteAxesAuxTrans``, and ``parasite_axes_auxtrans_class_factory`` are -deprecated. - -In general, it is suggested to use ``HostAxes.get_aux_axes`` to create -parasite axes, as this saves the need of manually appending the parasite -to ``host.parasites`` and makes sure that their ``remove()`` method works -properly. diff --git a/doc/api/next_api_changes/deprecations/18679-AL.rst b/doc/api/next_api_changes/deprecations/18679-AL.rst deleted file mode 100644 index 417dd6a35a77..000000000000 --- a/doc/api/next_api_changes/deprecations/18679-AL.rst +++ /dev/null @@ -1,3 +0,0 @@ -``backend_pgf.TmpDirCleaner`` -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -... is deprecated, with no replacement. diff --git a/doc/api/next_api_changes/deprecations/18680-AL.rst b/doc/api/next_api_changes/deprecations/18680-AL.rst deleted file mode 100644 index ce9e44e10397..000000000000 --- a/doc/api/next_api_changes/deprecations/18680-AL.rst +++ /dev/null @@ -1,8 +0,0 @@ -wx backend cleanups -~~~~~~~~~~~~~~~~~~~ -The *origin* parameter to ``_FigureCanvasWxBase.gui_repaint`` is deprecated -with no replacement; ``gui_repaint`` now automatically detects the case where -it is used with the wx renderer. - -The ``NavigationToolbar2Wx.get_canvas`` method is deprecated; directly -instantiate a canvas (``FigureCanvasWxAgg(frame, -1, figure)``) if needed. diff --git a/doc/api/next_api_changes/deprecations/18682-AL.rst b/doc/api/next_api_changes/deprecations/18682-AL.rst deleted file mode 100644 index e69b9013ff36..000000000000 --- a/doc/api/next_api_changes/deprecations/18682-AL.rst +++ /dev/null @@ -1,4 +0,0 @@ -``sphinext.plot_directive.align`` -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -... is deprecated. Use ``docutils.parsers.rst.directives.images.Image.align`` -instead. diff --git a/doc/api/next_api_changes/deprecations/18687-AL.rst b/doc/api/next_api_changes/deprecations/18687-AL.rst deleted file mode 100644 index 45416c897631..000000000000 --- a/doc/api/next_api_changes/deprecations/18687-AL.rst +++ /dev/null @@ -1,3 +0,0 @@ -GraphicsContextPS -~~~~~~~~~~~~~~~~~ -... is deprecated. The PostScript backend now uses `.GraphicsContextBase`. diff --git a/doc/api/next_api_changes/deprecations/18710-TH.rst b/doc/api/next_api_changes/deprecations/18710-TH.rst deleted file mode 100644 index ea0a5c498721..000000000000 --- a/doc/api/next_api_changes/deprecations/18710-TH.rst +++ /dev/null @@ -1,3 +0,0 @@ -``Axis.cla()``, ``RadialAxis.cla()``, ``ThetaAxis.cla()`` and ``Spine.cla()`` -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -These methods are deprecated in favor of the respective ``clear()`` methods. \ No newline at end of file diff --git a/doc/api/next_api_changes/deprecations/18798-JKS.rst b/doc/api/next_api_changes/deprecations/18798-JKS.rst deleted file mode 100644 index b42f46462d42..000000000000 --- a/doc/api/next_api_changes/deprecations/18798-JKS.rst +++ /dev/null @@ -1,8 +0,0 @@ -``ps.useafm`` deprecated for mathtext -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -Outputting mathtext using only standard PostScript fonts has likely -been broken for a while (issue `#18722 -`_). In -Matplotlib 3.5, the setting ``ps.useafm`` will have no effect on -mathtext. diff --git a/doc/api/next_api_changes/deprecations/18817-BGB.rst b/doc/api/next_api_changes/deprecations/18817-BGB.rst deleted file mode 100644 index 3088cd5d0db5..000000000000 --- a/doc/api/next_api_changes/deprecations/18817-BGB.rst +++ /dev/null @@ -1,3 +0,0 @@ -Line2D and Patch no longer duplicate ``validJoin`` and ``validCap`` -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -Validation of joinstyle and capstyles is now centralized in ``rcsetup``. diff --git a/doc/api/next_api_changes/deprecations/18949-TH.rst b/doc/api/next_api_changes/deprecations/18949-TH.rst deleted file mode 100644 index c5e5d60df383..000000000000 --- a/doc/api/next_api_changes/deprecations/18949-TH.rst +++ /dev/null @@ -1,3 +0,0 @@ -``AxisArtist.ZORDER`` -~~~~~~~~~~~~~~~~~~~~~ -use ``AxisArtist.zorder`` instead. \ No newline at end of file diff --git a/doc/api/next_api_changes/deprecations/19008-AL.rst b/doc/api/next_api_changes/deprecations/19008-AL.rst deleted file mode 100644 index fa76e9b0f847..000000000000 --- a/doc/api/next_api_changes/deprecations/19008-AL.rst +++ /dev/null @@ -1,5 +0,0 @@ -``FigureManagerBase.key_press`` and ``button_press`` -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -These methods, which incorrectly did nothing when using ``toolmanager``, are -deprecated in favor of directly passing the event to the `.CallbackRegistry` -via ``self.canvas.callbacks.process(event.name, event)``. diff --git a/doc/api/next_api_changes/deprecations/19018-AL.rst b/doc/api/next_api_changes/deprecations/19018-AL.rst deleted file mode 100644 index 69236e78edf8..000000000000 --- a/doc/api/next_api_changes/deprecations/19018-AL.rst +++ /dev/null @@ -1,3 +0,0 @@ -``ContourLabeler.get_label_coords`` is deprecated -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -It is considered an internal helper. diff --git a/doc/api/next_api_changes/deprecations/19019-AL.rst b/doc/api/next_api_changes/deprecations/19019-AL.rst deleted file mode 100644 index 847c8770a676..000000000000 --- a/doc/api/next_api_changes/deprecations/19019-AL.rst +++ /dev/null @@ -1,5 +0,0 @@ -*resize_callback* parameter to ``FigureCanvasTk`` -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -This parameter was never used internally and is deprecated. Tk-level custom -event handlers for resize events can be added to a ``FigureCanvasTk`` using -e.g. ``get_tk_widget().bind('', ..., True)``. diff --git a/doc/api/next_api_changes/deprecations/19042-AL.rst b/doc/api/next_api_changes/deprecations/19042-AL.rst deleted file mode 100644 index 24061f53fac4..000000000000 --- a/doc/api/next_api_changes/deprecations/19042-AL.rst +++ /dev/null @@ -1,5 +0,0 @@ -``GridHelperBase`` invalidation -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -The ``GridHelperBase.invalidate``, ``GridHelperBase.valid``, and -``axislines.Axes.invalidate_grid_helper`` methods are considered internal -and deprecated. diff --git a/doc/api/next_api_changes/deprecations/19046-AL.rst b/doc/api/next_api_changes/deprecations/19046-AL.rst deleted file mode 100644 index 431adcfeb0bb..000000000000 --- a/doc/api/next_api_changes/deprecations/19046-AL.rst +++ /dev/null @@ -1,5 +0,0 @@ -``MovieWriter.cleanup`` is deprecated -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -Cleanup logic is now fully implemented in `.MovieWriter.finish`. Third-party -movie writers should likewise move the relevant cleanup logic there, as -overridden ``cleanup``\s will no longer be called in the future. diff --git a/doc/api/next_api_changes/deprecations/19153-LPS.rst b/doc/api/next_api_changes/deprecations/19153-LPS.rst deleted file mode 100644 index b3094e3163e9..000000000000 --- a/doc/api/next_api_changes/deprecations/19153-LPS.rst +++ /dev/null @@ -1,5 +0,0 @@ -``pyplot.gca()``, ``Figure.gca`` -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -Passing keyword arguments to `.pyplot.gca` or `.figure.Figure.gca` will not be -supported in a future release. diff --git a/doc/api/next_api_changes/deprecations/19176-AL.rst b/doc/api/next_api_changes/deprecations/19176-AL.rst deleted file mode 100644 index d169ac7ed9b1..000000000000 --- a/doc/api/next_api_changes/deprecations/19176-AL.rst +++ /dev/null @@ -1,5 +0,0 @@ -Extra positional parameters to ``plot_surface`` and ``plot_wireframe`` -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -Positional parameters to `~.axes3d.Axes3D.plot_surface` and -`~.axes3d.Axes3D.plot_wireframe` other than ``X``, ``Y``, and ``Z`` are -deprecated. Pass additional artist properties as keyword arguments instead. diff --git a/doc/api/next_api_changes/deprecations/19336-AL.rst b/doc/api/next_api_changes/deprecations/19336-AL.rst deleted file mode 100644 index b77bca4c8cf5..000000000000 --- a/doc/api/next_api_changes/deprecations/19336-AL.rst +++ /dev/null @@ -1,3 +0,0 @@ -Setting a Line2D's pickradius via ``set_picker`` is undeprecated -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -This cancels the deprecation introduced in Matplotlib 3.3.0. diff --git a/doc/api/next_api_changes/deprecations/19341-TH.rst b/doc/api/next_api_changes/deprecations/19341-TH.rst deleted file mode 100644 index 07ab5bdde4b8..000000000000 --- a/doc/api/next_api_changes/deprecations/19341-TH.rst +++ /dev/null @@ -1,5 +0,0 @@ -``MarkerStyle`` is considered immutable -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -``MarkerStyle.set_fillstyle()`` and ``MarkerStyle.set_marker()`` are -deprecated. Create a new ``MarkerStyle`` with the respective parameters -instead. diff --git a/doc/api/next_api_changes/deprecations/19503-AL.rst b/doc/api/next_api_changes/deprecations/19503-AL.rst deleted file mode 100644 index c9c43da5043f..000000000000 --- a/doc/api/next_api_changes/deprecations/19503-AL.rst +++ /dev/null @@ -1,6 +0,0 @@ -The *dpi* parameter of ``FigureCanvas.print_foo`` printers is deprecated -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -The `~.Figure.savefig` machinery already took care of setting the figure dpi -to the desired value, so ``print_foo`` can directly read it from there. Not -passing *dpi* to ``print_foo`` allows clearer detection of unused parameters -passed to `~.Figure.savefig`. diff --git a/doc/api/prev_api_changes/api_changes_3.4.0.rst b/doc/api/prev_api_changes/api_changes_3.4.0.rst index ebd17cd1f2db..309c1c677e1c 100644 --- a/doc/api/prev_api_changes/api_changes_3.4.0.rst +++ b/doc/api/prev_api_changes/api_changes_3.4.0.rst @@ -7,6 +7,8 @@ API Changes for 3.4.0 .. include:: /api/prev_api_changes/api_changes_3.4.0/behaviour.rst +.. include:: /api/prev_api_changes/api_changes_3.4.0/deprecations.rst + .. include:: /api/prev_api_changes/api_changes_3.4.0/removals.rst .. include:: /api/prev_api_changes/api_changes_3.4.0/development.rst diff --git a/doc/api/prev_api_changes/api_changes_3.4.0/deprecations.rst b/doc/api/prev_api_changes/api_changes_3.4.0/deprecations.rst new file mode 100644 index 000000000000..120797270954 --- /dev/null +++ b/doc/api/prev_api_changes/api_changes_3.4.0/deprecations.rst @@ -0,0 +1,354 @@ +Deprecations +------------ + +Extra parameters to Axes constructor +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Parameters of the Axes constructor other than *fig* and *rect* will become +keyword-only in a future version. + +``pyplot.gca`` and ``Figure.gca`` keyword arguments +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Passing keyword arguments to `.pyplot.gca` or `.figure.Figure.gca` will not be +supported in a future release. + +``Axis.cla``, ``RadialAxis.cla``, ``ThetaAxis.cla`` and ``Spine.cla`` +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +These methods are deprecated in favor of the respective ``clear()`` methods. + +Invalid hatch pattern characters are no longer ignored +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +When specifying hatching patterns, characters that are not recognized will +raise a deprecation warning. In the future, this will become a hard error. + +``imread`` reading from URLs +~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Passing a URL to `~.pyplot.imread()` is deprecated. 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. + +Subplot-related attributes and methods +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Some ``SubplotBase`` methods and attributes have been deprecated and/or moved +to `.SubplotSpec`: + +- ``get_geometry`` (use `.SubplotBase.get_subplotspec` instead), +- ``change_geometry`` (use `.SubplotBase.set_subplotspec` instead), +- ``is_first_row``, ``is_last_row``, ``is_first_col``, ``is_last_col`` (use the + corresponding methods on the `.SubplotSpec` instance instead), +- ``update_params`` (now a no-op), +- ``figbox`` (use ``ax.get_subplotspec().get_geometry(ax.figure)`` instead to + recompute the geometry, or ``ax.get_position()`` to read its current value), +- ``numRows``, ``numCols`` (use the ``nrows`` and ``ncols`` attribute on the + `.GridSpec` instead). + +Likewise, the ``get_geometry``, ``change_geometry``, ``update_params``, and +``figbox`` methods/attributes of `.SubplotDivider` have been deprecated, with +similar replacements. + +``is_url`` and ``URL_REGEX`` +~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +... are deprecated. (They were previously defined in the toplevel +:mod:`matplotlib` module.) + +``matplotlib.style.core`` deprecations +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +``STYLE_FILE_PATTERN``, ``load_base_library``, and ``iter_user_libraries`` are +deprecated. + +``Tick.apply_tickdir`` is deprecated +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +``apply_tickdir`` didn't actually update the tick markers on the existing +Line2D objects used to draw the ticks; use `.Axis.set_tick_params` instead. + +``dpi_cor`` property of `.FancyArrowPatch` +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +This parameter is considered internal and deprecated. + +Passing ``boxstyle="custom", bbox_transmuter=...`` to ``FancyBboxPatch`` +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +In order to use a custom boxstyle, directly pass it as the *boxstyle* argument +to `.FancyBboxPatch`. This was previously already possible, and is consistent +with custom arrow styles and connection styles. + +BoxStyles are now called without passing the *mutation_aspect* parameter +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Mutation aspect is now handled by the artist itself. Hence the +*mutation_aspect* parameter of ``BoxStyle._Base.__call__`` is deprecated, and +custom boxstyles should be implemented to not require this parameter (it can be +left as a parameter defaulting to 1 for back-compatibility). + +``ContourLabeler.get_label_coords`` is deprecated +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +It is considered an internal helper. + +Line2D and Patch no longer duplicate ``validJoin`` and ``validCap`` +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Validation of joinstyle and capstyles is now centralized in ``rcsetup``. + +Setting a Line2D's pickradius via ``set_picker`` is undeprecated +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +This cancels the deprecation introduced in Matplotlib 3.3.0. + +``MarkerStyle`` is considered immutable +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +``MarkerStyle.set_fillstyle()`` and ``MarkerStyle.set_marker()`` are +deprecated. Create a new ``MarkerStyle`` with the respective parameters +instead. + +``MovieWriter.cleanup`` is deprecated +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Cleanup logic is now fully implemented in `.MovieWriter.finish`. Third-party +movie writers should likewise move the relevant cleanup logic there, as +overridden ``cleanup``\s will no longer be called in the future. + +*minimumdescent* parameter/property of ``TextArea`` +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +`.offsetbox.TextArea` has behaved as if *minimumdescent* was always True +(regardless of the value to which it was set) since Matplotlib 1.3, so the +parameter/property is deprecated. + +``colorbar`` now warns when the mappable's Axes is different from the current Axes +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Currently, `.Figure.colorbar` and `.pyplot.colorbar` steal space by default +from the current Axes to place the colorbar. In a future version, they will +steal space from the mappable's Axes instead. In preparation for this change, +`.Figure.colorbar` and `.pyplot.colorbar` now emits a warning when the current +Axes is not the same as the mappable's Axes. + +Colorbar docstrings +~~~~~~~~~~~~~~~~~~~ + +The following globals in :mod:`matplotlib.colorbar` are deprecated: +``colorbar_doc``, ``colormap_kw_doc``, ``make_axes_kw_doc``. + +``ColorbarPatch`` and ``colorbar_factory`` are deprecated +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +All the relevant functionality has been moved to the +`~matplotlib.colorbar.Colorbar` class. + +Backend deprecations +~~~~~~~~~~~~~~~~~~~~ + +- ``FigureCanvasBase.get_window_title`` and + ``FigureCanvasBase.set_window_title`` are deprecated. Use the corresponding + methods on the FigureManager if using pyplot, or GUI-specific methods if + embedding. +- The *resize_callback* parameter to ``FigureCanvasTk`` was never used + internally and is deprecated. Tk-level custom event handlers for resize + events can be added to a ``FigureCanvasTk`` using e.g. + ``get_tk_widget().bind('', ..., True)``. +- The ``key_press`` and ``button_press`` methods of `.FigureManagerBase`, which + incorrectly did nothing when using ``toolmanager``, are deprecated in favor + of directly passing the event to the `.CallbackRegistry` via + ``self.canvas.callbacks.process(event.name, event)``. +- ``RendererAgg.get_content_extents`` and + ``RendererAgg.tostring_rgba_minimized`` are deprecated. +- ``backend_pgf.TmpDirCleaner`` is deprecated, with no replacement. +- ``GraphicsContextPS`` is deprecated. The PostScript backend now uses + `.GraphicsContextBase`. + +wx backend cleanups +~~~~~~~~~~~~~~~~~~~ + +The *origin* parameter to ``_FigureCanvasWxBase.gui_repaint`` is deprecated +with no replacement; ``gui_repaint`` now automatically detects the case where +it is used with the wx renderer. + +The ``NavigationToolbar2Wx.get_canvas`` method is deprecated; directly +instantiate a canvas (``FigureCanvasWxAgg(frame, -1, figure)``) if needed. + +Unused positional parameters to ``print_`` methods are deprecated +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +None of the ``print_`` methods implemented by canvas subclasses used +positional arguments other that the first (the output filename or file-like), +so these extra parameters are deprecated. + +The *dpi* parameter of ``FigureCanvas.print_foo`` printers is deprecated +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +The `~.Figure.savefig` machinery already took care of setting the figure DPI +to the desired value, so ``print_foo`` can directly read it from there. Not +passing *dpi* to ``print_foo`` allows clearer detection of unused parameters +passed to `~.Figure.savefig`. + +Passing `bytes` to ``FT2Font.set_text`` +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +... is deprecated, pass `str` instead. + +``ps.useafm`` deprecated for mathtext +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Outputting mathtext using only standard PostScript fonts has likely been broken +for a while (issue `#18722 +`_). In Matplotlib 3.5, +the setting :rc:`ps.useafm` will have no effect on mathtext. + +``MathTextParser("bitmap")`` is deprecated +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +The associated APIs ``MathtextBackendBitmap``, ``MathTextParser.to_mask``, +``MathTextParser.to_rgba``, ``MathTextParser.to_png``, and +``MathTextParser.get_depth`` are likewise deprecated. + +To convert a text string to an image, either directly draw the text to an +empty `.Figure` and save the figure using a tight bbox, as demonstrated in +:doc:`/gallery/text_labels_and_annotations/mathtext_asarray`, or use +`.mathtext.math_to_image`. + +When using `.math_to_image`, text color can be set with e.g.:: + + with plt.rc_context({"text.color": "tab:blue"}): + mathtext.math_to_image(text, filename) + +and an RGBA array can be obtained with e.g.:: + + from io import BytesIO + buf = BytesIO() + mathtext.math_to_image(text, buf, format="png") + buf.seek(0) + rgba = plt.imread(buf) + +Deprecation of mathtext internals +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +The following API elements previously exposed by the :mod:`.mathtext` module +are considered to be implementation details and public access to them is +deprecated: + +- ``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``. + +Deprecation of various mathtext helpers +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +The ``MathtextBackendPdf``, ``MathtextBackendPs``, ``MathtextBackendSvg``, +and ``MathtextBackendCairo`` classes from the :mod:`.mathtext` module, as +well as the corresponding ``.mathtext_parser`` attributes on ``RendererPdf``, +``RendererPS``, ``RendererSVG``, and ``RendererCairo``, are deprecated. The +``MathtextBackendPath`` class can be used to obtain a list of glyphs and +rectangles in a mathtext expression, and renderer-specific logic should be +directly implemented in the renderer. + +``StandardPsFonts.pswriter`` is unused and deprecated. + +Widget class internals +~~~~~~~~~~~~~~~~~~~~~~ + +Several `.widgets.Widget` class internals have been privatized and deprecated: + +- ``AxesWidget.cids`` +- ``Button.cnt`` and ``Button.observers`` +- ``CheckButtons.cnt`` and ``CheckButtons.observers`` +- ``RadioButtons.cnt`` and ``RadioButtons.observers`` +- ``Slider.cnt`` and ``Slider.observers`` +- ``TextBox.cnt``, ``TextBox.change_observers`` and + ``TextBox.submit_observers`` + +3D properties on renderers +~~~~~~~~~~~~~~~~~~~~~~~~~~ + +The properties of the 3D Axes that were placed on the Renderer during draw are +now deprecated: + +- ``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. + +*renderer* argument of ``do_3d_projection`` method for ``Collection3D``/``Patch3D`` +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +The *renderer* argument for the ``do_3d_projection`` method on ``Collection3D`` +and ``Patch3D`` is no longer necessary, and passing it during draw is +deprecated. + +*project* argument of ``draw`` method for ``Line3DCollection`` +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +The *project* argument for the ``draw`` method on ``Line3DCollection`` is +deprecated. Call `.Line3DCollection.do_3d_projection` explicitly instead. + +Extra positional parameters to ``plot_surface`` and ``plot_wireframe`` +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Positional parameters to `~.axes3d.Axes3D.plot_surface` and +`~.axes3d.Axes3D.plot_wireframe` other than ``X``, ``Y``, and ``Z`` are +deprecated. Pass additional artist properties as keyword arguments instead. + +``ParasiteAxesAuxTransBase`` class +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +The functionality of that mixin class has been moved to the base +``ParasiteAxesBase`` class. Thus, ``ParasiteAxesAuxTransBase``, +``ParasiteAxesAuxTrans``, and ``parasite_axes_auxtrans_class_factory`` are +deprecated. + +In general, it is suggested to use ``HostAxes.get_aux_axes`` to create +parasite Axes, as this saves the need of manually appending the parasite +to ``host.parasites`` and makes sure that their ``remove()`` method works +properly. + +``AxisArtist.ZORDER`` attribute +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Use ``AxisArtist.zorder`` instead. + +``GridHelperBase`` invalidation +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +The ``GridHelperBase.invalidate``, ``GridHelperBase.valid``, and +``axislines.Axes.invalidate_grid_helper`` methods are considered internal +and deprecated. + +``sphinext.plot_directive.align`` +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +... is deprecated. Use ``docutils.parsers.rst.directives.images.Image.align`` +instead. + +Deprecation-related functionality is considered internal +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +The module ``matplotlib.cbook.deprecation`` is considered internal and will be +removed from the public API. This also holds for deprecation-related re-imports +in ``matplotlib.cbook``, i.e. ``matplotlib.cbook.deprecated()``, +``matplotlib.cbook.warn_deprecated()``, +``matplotlib.cbook.MatplotlibDeprecationWarning`` and +``matplotlib.cbook.mplDeprecation``. + +If needed, external users may import ``MatplotlibDeprecationWarning`` directly +from the ``matplotlib`` namespace. ``mplDeprecation`` is only an alias of +``MatplotlibDeprecationWarning`` and should not be used anymore. diff --git a/doc/api/prev_api_changes/api_changes_3.4.0/development.rst b/doc/api/prev_api_changes/api_changes_3.4.0/development.rst index 3821087539b6..64783307d4e3 100644 --- a/doc/api/prev_api_changes/api_changes_3.4.0/development.rst +++ b/doc/api/prev_api_changes/api_changes_3.4.0/development.rst @@ -1,8 +1,26 @@ Development changes ------------------- -Matplotlib now requires numpy>=1.16 -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +Increase to minimum supported versions of Python and dependencies +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +For Maptlotlib 3.4, the :ref:`minimum supported versions ` are +being bumped: + ++------------+-----------------+---------------+ +| Dependency | min in mpl3.3 | min in mpl3.4 | ++============+=================+===============+ +| Python | 3.6 | 3.7 | ++------------+-----------------+---------------+ +| dateutil | 2.1 | 2.7 | ++------------+-----------------+---------------+ +| numpy | 1.15 | 1.16 | ++------------+-----------------+---------------+ +| pyparsing | 2.0.3 | 2.2.1 | ++------------+-----------------+---------------+ + +This is consistent with our :ref:`min_deps_policy` and `NEP29 +`__ ``FigureBase`` class added, and ``Figure`` class made a child ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ From d81d15d368ec8b7fbdd3c0450d7d3ee96641ffe1 Mon Sep 17 00:00:00 2001 From: Elliott Sales de Andrade Date: Wed, 17 Mar 2021 20:09:56 -0400 Subject: [PATCH 6/6] DOC: Add an API note about Qhull changes. --- .../prev_api_changes/api_changes_3.4.0/development.rst | 8 ++++++++ setup.cfg.template | 2 +- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/doc/api/prev_api_changes/api_changes_3.4.0/development.rst b/doc/api/prev_api_changes/api_changes_3.4.0/development.rst index 64783307d4e3..ab5e118de9e8 100644 --- a/doc/api/prev_api_changes/api_changes_3.4.0/development.rst +++ b/doc/api/prev_api_changes/api_changes_3.4.0/development.rst @@ -22,6 +22,14 @@ being bumped: This is consistent with our :ref:`min_deps_policy` and `NEP29 `__ +Qhull downloaded at build-or-sdist time +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Much like FreeType, Qhull is now downloaded at build time, or upon creation of +the sdist. To link against system Qhull, set the ``system_qhull`` option to +`True` in the :file:`setup.cfg` file. Note that Matplotlib now requires the +re-entrant version of Qhull (``qhull_r``). + ``FigureBase`` class added, and ``Figure`` class made a child ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/setup.cfg.template b/setup.cfg.template index f203e7d3d051..6b40f29fc217 100644 --- a/setup.cfg.template +++ b/setup.cfg.template @@ -10,7 +10,7 @@ license_files = LICENSE/* # often, and don't need the space saving/speedup. #enable_lto = True # By default, Matplotlib downloads and builds its own copies of FreeType and of -# of Qhull. You may set the following to True to instead link against a system +# Qhull. You may set the following to True to instead link against a system # FreeType/Qhull. As an exception, Matplotlib defaults to the system version # of FreeType on AIX. #system_freetype = False