Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit fafb013

Browse files
committed
DOC: consolidate deprecation and removal docs
1 parent aef9bfe commit fafb013

File tree

1 file changed

+72
-78
lines changed

1 file changed

+72
-78
lines changed

doc/api/api_changes.rst

Lines changed: 72 additions & 78 deletions
Original file line numberDiff line numberDiff line change
@@ -44,13 +44,6 @@ Drop support for python 2
4444
Matplotlib 3 only supports python 3.5 and higher.
4545

4646

47-
Hold machinery removed
48-
----------------------
49-
50-
Setting or unsetting ``hold`` (deprecated in version 2.1) has now
51-
been completely removed. Matplotlib now always behaves as if ``hold=True``.
52-
To clear an axes you can manually use :meth:`~.axes.Axes.cla()`,
53-
or to clear an entire figure use :meth:`~.figure.Figure.clf()`.
5447

5548

5649
`.Axes.hist2d` now uses `~.Axes.pcolormesh` instead of `~.Axes.pcolorfast`
@@ -74,6 +67,9 @@ This change sets text objects passed ``None`` to have empty strings, so that
7467

7568
Deprecations
7669
------------
70+
71+
Modules
72+
```````
7773
The following modules are deprecated:
7874

7975
- :mod:`matplotlib.compat.subprocess`. This was a python 2 workaround, but all
@@ -82,6 +78,9 @@ The following modules are deprecated:
8278
- :mod:`matplotlib.backends.wx_compat`. Python 3 is only compatible with
8379
wxPython 4, so support for wxPython 3 or earlier can be dropped.
8480

81+
Classes, methods, functions, and attributes
82+
```````````````````````````````````````````
83+
8584
The following classes, methods, functions, and attributes are deprecated:
8685

8786
- ``RcParams.msg_depr``, ``RcParams.msg_depr_ignore``,
@@ -126,12 +125,16 @@ The following classes, methods, functions, and attributes are deprecated:
126125
- `.Legend.draggable()`, in favor of `.Legend.set_draggable()`
127126
(``Legend.draggable`` may be reintroduced as a property in future releases)
128127
- ``textpath.TextToPath.tex_font_map``
129-
130-
The following rcParams are deprecated:
131-
132-
- ``examples.directory`` (use ``datapath`` instead)
133-
- ``pgf.debug`` (the pgf backend relies on logging)
134-
- ``text.latex.unicode``
128+
- :class:`matplotlib.cbook.deprecation.mplDeprecation` will be removed in
129+
future versions. It is just an alias for
130+
:class:`matplotlib.cbook.deprecation.MatplotlibDeprecationWarning`.
131+
Please use the :class:`~.MatplotlibDeprecationWarning` directly if neccessary.
132+
- The ``matplotlib.cbook.Bunch`` class has been deprecated. Instead, use
133+
`types.SimpleNamespace` from the standard library which provides the same
134+
functionality.
135+
- ``Axes.mouseover_set`` is now a frozenset, and deprecated. Directly
136+
manipulate the artist's ``.mouseover`` attribute to change their mouseover
137+
status.
135138

136139
The following keyword arguments are deprecated:
137140

@@ -142,75 +145,86 @@ The following call signatures are deprecated:
142145

143146
- passing a ``wx.EvtHandler`` as first argument to ``backend_wx.TimerWx``
144147

148+
rcParams
149+
````````
145150

146-
Deprecated methods removed from `matplotlib.testing`
147-
----------------------------------------------------
148-
149-
The deprecated methods `knownfailureif` and `remove_text` have been removed
150-
from :mod:`matplotlib.testing.decorators`.
151-
152-
The entire contents of `testing.noseclasses` have also been removed.
153-
151+
The following rcParams are deprecated:
154152

155-
``matplotlib.cbook.deprecation.mplDeprecation`` is deprecated
156-
-------------------------------------------------------------
153+
- ``examples.directory`` (use ``datapath`` instead)
154+
- ``pgf.debug`` (the pgf backend relies on logging)
155+
- ``text.latex.unicode``
157156

158-
:class:`matplotlib.cbook.deprecation.mplDeprecation` will be removed in
159-
future versions. It is just an alias for
160-
:class:`matplotlib.cbook.deprecation.MatplotlibDeprecationWarning`.
161-
Please use the :class:`~.MatplotlibDeprecationWarning` directly if neccessary.
162157

158+
marker styles
159+
`````````````
160+
- Using ``(n, 3)`` as marker style to specify a circle marker is deprecated. Use
161+
``"o"`` instead.
162+
- Using ``([(x0, y0), (x1, y1), ...], 0)`` as marker style to specify a custom
163+
marker path is deprecated. Use ``[(x0, y0), (x1, y1), ...]`` instead.
163164

164-
matplotlib.cbook.Bunch deprecated
165-
---------------------------------
166165

167-
The ``matplotlib.cbook.Bunch`` class has been deprecated. Instead, use
168-
`types.SimpleNamespace` from the standard library which provides the same
169-
functionality.
166+
Deprecation of ``LocatableAxes`` in toolkits
167+
````````````````````````````````````````````
170168

169+
The ``LocatableAxes`` classes in toolkits have been deprecated. The base `Axes`
170+
classes provide the same functionality to all subclasses, thus these mixins are
171+
no longer necessary. Related functions have also been deprecated. Specifically:
171172

172-
Deprecation of certain marker styles
173-
------------------------------------
173+
* ``mpl_toolkits.axes_grid1.axes_divider.LocatableAxesBase``: no specific
174+
replacement; use any other ``Axes``-derived class directly instead.
175+
* ``mpl_toolkits.axes_grid1.axes_divider.locatable_axes_factory``: no specific
176+
replacement; use any other ``Axes``-derived class directly instead.
177+
* ``mpl_toolkits.axes_grid1.axes_divider.Axes``: use
178+
`mpl_toolkits.axes_grid1.mpl_axes.Axes` directly.
179+
* ``mpl_toolkits.axes_grid1.axes_divider.LocatableAxes``: use
180+
`mpl_toolkits.axes_grid1.mpl_axes.Axes` directly.
181+
* ``mpl_toolkits.axisartist.axes_divider.Axes``: use
182+
`mpl_toolkits.axisartist.axislines.Axes` directly.
183+
* ``mpl_toolkits.axisartist.axes_divider.LocatableAxes``: use
184+
`mpl_toolkits.axisartist.axislines.Axes` directly.
174185

175-
Using ``(n, 3)`` as marker style to specify a circle marker is deprecated. Use
176-
``"o"`` instead.
177186

178-
Using ``([(x0, y0), (x1, y1), ...], 0)`` as marker style to specify a custom
179-
marker path is deprecated. Use ``[(x0, y0), (x1, y1), ...]`` instead.
180187

188+
``Axes3D.get_xlim``, ``get_ylim`` and ``get_zlim`` now return a tuple
189+
---------------------------------------------------------------------
181190

182-
Removal of deprecated backends
183-
------------------------------
191+
They previously returned an array. Returning a tuple is consistent with the
192+
behavior for 2D axes.
184193

185-
Deprecated backends have been removed:
186194

187-
* GTKAgg
188-
* GTKCairo
189-
* GTK
190-
* GDK
195+
Removals
196+
--------
191197

198+
Hold machinery
199+
``````````````
192200

193-
``Axes3D.get_xlim``, ``get_ylim`` and ``get_zlim`` now return a tuple
194-
---------------------------------------------------------------------
201+
Setting or unsetting ``hold`` (deprecated in version 2.1) has now
202+
been completely removed. Matplotlib now always behaves as if ``hold=True``.
203+
To clear an axes you can manually use :meth:`~.axes.Axes.cla()`,
204+
or to clear an entire figure use :meth:`~.figure.Figure.clf()`.
195205

196-
They previously returned an array. Returning a tuple is consistent with the
197-
behavior for 2D axes.
198206

207+
Removal of deprecated backends
208+
``````````````````````````````
199209

200-
Modified APIs
201-
-------------
210+
Deprecated backends have been removed:
202211

203-
The following APIs have been modified:
212+
* GTKAgg
213+
* GTKCairo
214+
* GTK
215+
* GDK
204216

205-
- ``Axes.mouseover_set`` is now a frozenset, and deprecated. Directly
206-
manipulate the artist's ``.mouseover`` attribute to change their mouseover
207-
status.
208217

209218
Removal of deprecated APIs
210-
--------------------------
219+
``````````````````````````
211220

212221
The following deprecated API elements have been removed:
222+
Deprecated methods removed from ``
223+
213224

225+
- The deprecated methods ``knownfailureif`` and ``remove_text`` have been removed
226+
from :mod:`matplotlib.testing.decorators`.
227+
- The entire contents of ``testing.noseclasses`` have also been removed.
214228
- ``matplotlib.checkdep_tex``, ``matplotlib.checkdep_xmllint``,
215229
- ``backend_bases.IdleEvent``,
216230
- ``cbook.converter``, ``cbook.tostr``, ``cbook.todatetime``, ``cbook.todate``,
@@ -301,8 +315,8 @@ warning if only two positional arguments are passed. To supply only ``x`` and
301315
``y`` margins, use keyword arguments.
302316

303317

304-
lib/mpl_examples removed
305-
------------------------
318+
lib/mpl_examples symlink removed
319+
--------------------------------
306320

307321
The symlink from lib/mpl_examples to ../examples has been removed.
308322
This is not installed as an importable package and should not affect
@@ -509,26 +523,6 @@ particular, this prevents the ``backend`` and ``interactive`` rcParams from
509523
being incorrectly modified by these functions.
510524

511525

512-
Deprecation of ``LocatableAxes`` in toolkits
513-
--------------------------------------------
514-
515-
The ``LocatableAxes`` classes in toolkits have been deprecated. The base `Axes`
516-
classes provide the same functionality to all subclasses, thus these mixins are
517-
no longer necessary. Related functions have also been deprecated. Specifically:
518-
519-
* ``mpl_toolkits.axes_grid1.axes_divider.LocatableAxesBase``: no specific
520-
replacement; use any other ``Axes``-derived class directly instead.
521-
* ``mpl_toolkits.axes_grid1.axes_divider.locatable_axes_factory``: no specific
522-
replacement; use any other ``Axes``-derived class directly instead.
523-
* ``mpl_toolkits.axes_grid1.axes_divider.Axes``: use
524-
`mpl_toolkits.axes_grid1.mpl_axes.Axes` directly.
525-
* ``mpl_toolkits.axes_grid1.axes_divider.LocatableAxes``: use
526-
`mpl_toolkits.axes_grid1.mpl_axes.Axes` directly.
527-
* ``mpl_toolkits.axisartist.axes_divider.Axes``: use
528-
`mpl_toolkits.axisartist.axislines.Axes` directly.
529-
* ``mpl_toolkits.axisartist.axes_divider.LocatableAxes``: use
530-
`mpl_toolkits.axisartist.axislines.Axes` directly.
531-
532526

533527

534528
`.matplotlib.Axes.get_tightbbox` now includes all artists

0 commit comments

Comments
 (0)