Skip to content

Commit 03a3d21

Browse files
authored
Merge pull request #18753 from QuLogic/remove-deprecations
API: Remove several more deprecations
2 parents e03d956 + b1100ab commit 03a3d21

31 files changed

+114
-1116
lines changed

doc/api/axes_api.rst

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -587,7 +587,6 @@ non-rectilinear Axes.
587587
Axes.get_xaxis_transform
588588
Axes.get_yaxis_transform
589589
Axes.get_data_ratio
590-
Axes.get_data_ratio_log
591590

592591
Axes.get_xaxis_text1_transform
593592
Axes.get_xaxis_text2_transform

doc/api/axis_api.rst

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -226,8 +226,6 @@ Other
226226
Axis.limit_range_for_scale
227227
Axis.reset_ticks
228228
Axis.set_default_intervals
229-
Axis.get_smart_bounds
230-
Axis.set_smart_bounds
231229

232230
Discouraged
233231
-----------
Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
``Axes`` methods and properties
2+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
3+
4+
- ``axes.Axes.get_data_ratio_log``
5+
- ``axes.SubplotBase.rowNum``; use ``ax.get_subplotspec().rowspan.start``
6+
instead
7+
- ``axes.SubplotBase.colNum``; use ``ax.get_subplotspec().colspan.start``
8+
instead
9+
- the *verts* parameter to ``scatter`` (use *marker* instead)
10+
- Passing more than one positional argument to `~matplotlib.axes.Axes.axis`
11+
will now raise an error.
12+
- Passing ``"range"`` to the *whis* parameter of `.Axes.boxplot` and
13+
`.cbook.boxplot_stats` to mean "the whole data range" is no longer
14+
supported.
15+
- Passing scalars to parameter *where* in `.axes.Axes.fill_between` and
16+
`.axes.Axes.fill_betweenx` is no longer accepted and non-matching sizes now
17+
raise a `ValueError`.
18+
19+
``dates`` functions
20+
~~~~~~~~~~~~~~~~~~~
21+
- ``dates.mx2num``
22+
23+
``quiver`` methods
24+
~~~~~~~~~~~~~~~~~~
25+
26+
- ``quiver.QuiverKey.quiverkey_doc`` has been removed; use
27+
``quiver.QuiverKey.__init__.__doc__`` instead.
28+
29+
Smart bounds
30+
~~~~~~~~~~~~
31+
32+
The "smart bounds" functionality on `~.axis.Axis` and `.Spine` has been
33+
deleted, and the following methods are removed:
34+
35+
- ``Axis.set_smart_bounds`` and ``Axis.get_smart_bounds``
36+
- ``Spine.set_smart_bounds`` and ``Spine.get_smart_bounds``
37+
38+
Testing
39+
~~~~~~~
40+
The *switch_backend_warn* parameter to ``matplotlib.test`` has no effect and
41+
has been removed.
42+
43+
``tight_layout()``
44+
~~~~~~~~~~~~~~~~~~
45+
The *renderer* parameter to `.Figure.tight_layout` has been removed; this
46+
method now always uses the renderer instance cached on the `.Figure`.
47+
48+
``axes_grid1``
49+
~~~~~~~~~~~~~~
50+
The ``mpl_toolkits.axes_grid1.colorbar`` module and its colorbar implementation
51+
have been removed in favor of :mod:`matplotlib.colorbar`. Additionally:
52+
53+
- The *locator* parameter to ``colorbar()`` has been removed in favor of its
54+
synonym *ticks* (which already existed previously, and is consistent with
55+
:mod:`matplotlib.colorbar`).
56+
- The ``mpl_toolkits.legacy_colorbar`` rcParam has no effect and also has been
57+
removed.

doc/api/prev_api_changes/api_changes_3.2.0/deprecations.rst

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -142,6 +142,11 @@ Passing scalars to parameter *where* in ``fill_between()`` and
142142
broadcasted to the size of *x*. Non-matching sizes will raise a ``ValueError``
143143
in the future.
144144

145+
``scatter()``
146+
~~~~~~~~~~~~~
147+
Passing the *verts* parameter to `.axes.Axes.scatter` is deprecated; use the
148+
*marker* parameter instead.
149+
145150
``tight_layout()``
146151
~~~~~~~~~~~~~~~~~~
147152
The ``renderer`` parameter to `.Figure.tight_layout` is deprecated; this method
@@ -255,8 +260,8 @@ both 1) matplotlib's conftests have not been called and 2) nose is in
255260
During the deprecation period, to force the generation of nose base tests,
256261
import nose first.
257262

258-
The ``switch_backend_warn`` parameter to ``matplotlib.test`` has no effect and
259-
is deprecated.
263+
The *switch_backend_warn* parameter to ``matplotlib.test`` has no effect and is
264+
deprecated.
260265

261266
``testing.jpl_units.UnitDbl.UnitDbl.checkUnits`` is deprecated.
262267

doc/api/prev_api_changes/api_changes_3.2.0/removals.rst

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,8 +57,7 @@ The following API elements have been removed:
5757
instead)
5858
- ``axisartist.axes_divider.Axes``, ``axisartist.axes_divider.LocatableAxes``
5959
(use ``axisartist.axislines.Axes`` instead)
60-
- the ``normed`` kwarg to ``hist`` (use ``density`` instead)
61-
- the ``verts`` parameter to ``scatter`` (use ``marker`` instead)
60+
- the *normed* keyword argument to ``hist`` (use *density* instead)
6261
- passing ``(verts, 0)`` or ``(..., 3)`` when specifying a marker to specify a
6362
path or a circle, respectively (instead, use ``verts`` or ``"o"``,
6463
respectively)

doc/api/toolkits/axes_grid1.rst

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@ See :ref:`axes_grid1_users-guide-index` for a guide on the usage of axes_grid1.
2929
axes_grid1.axes_grid
3030
axes_grid1.axes_rgb
3131
axes_grid1.axes_size
32-
axes_grid1.colorbar
3332
axes_grid1.inset_locator
3433
axes_grid1.mpl_axes
3534
axes_grid1.parasite_axes

doc/missing-references.json

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -191,9 +191,6 @@
191191
"backend_qt5.FigureCanvasQTAgg": [
192192
"doc/api/prev_api_changes/api_changes_2.2.0.rst:210"
193193
],
194-
"datetime": [
195-
"lib/matplotlib/dates.py:docstring of matplotlib.dates.mx2num:2"
196-
],
197194
"dateutil.rrule.rrulebase": [
198195
"<external>/rrule.py:docstring of matplotlib.dates.rrule:1"
199196
],

examples/axes_grid1/demo_axes_grid.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,6 @@
1111
from mpl_toolkits.axes_grid1 import ImageGrid
1212

1313

14-
plt.rcParams["mpl_toolkits.legacy_colorbar"] = False
15-
16-
1714
def get_demo_image():
1815
z = cbook.get_sample_data("axes_grid/bivariate_normal.npy", np_load=True)
1916
# z is a numpy array of 15x15

examples/axes_grid1/demo_axes_grid2.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,6 @@
1313
from mpl_toolkits.axes_grid1 import ImageGrid
1414

1515

16-
plt.rcParams["mpl_toolkits.legacy_colorbar"] = False
17-
18-
1916
def add_inner_title(ax, title, loc, **kwargs):
2017
from matplotlib.offsetbox import AnchoredText
2118
from matplotlib.patheffects import withStroke

examples/axes_grid1/demo_edge_colorbar.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,6 @@
1212
from mpl_toolkits.axes_grid1 import AxesGrid
1313

1414

15-
plt.rcParams["mpl_toolkits.legacy_colorbar"] = False
16-
17-
1815
def get_demo_image():
1916
z = cbook.get_sample_data("axes_grid/bivariate_normal.npy", np_load=True)
2017
# z is a numpy array of 15x15

0 commit comments

Comments
 (0)