@@ -14,114 +14,126 @@ API Changes in 2.2.0
14
14
====================
15
15
16
16
..
17
+
17
18
.. toctree ::
18
19
:glob:
19
20
:maxdepth: 1
20
21
21
22
next_api_changes/*
22
23
23
- MovieWriterRegistry raises RuntimeError when writer not available
24
- -----------------------------------------------------------------
25
24
26
- If `MovieWriterRegistry ` can't find the requested `MovieWriter `, a more helpful
27
- `RuntimeError ` message is now raised instead of the previously raised
28
- `KeyError `.
25
+ Deprecations
26
+ ------------
29
27
28
+ Classes, functions, and methods
29
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
30
30
31
- Using strings instead of booleans to control grid and tick visibility is deprecated
32
- -----------------------------------------------------------------------------------
31
+ The unused and untested `` Artist.onRemove `` and `` Artist.hitlist `` methods have
32
+ been deprecated.
33
33
34
- Using ``"on" ``, ``"off" ``, ``"true" ``, or ``"false" `` to control grid
35
- and tick visibility has been deprecated. Instead, use normal booleans
36
- (``True ``/``False ``) or boolean-likes. In the future, all non-empty strings
37
- may be interpreted as ``True ``.
34
+ The now unused ``mlab.less_simple_linear_interpolation `` function is
35
+ deprecated.
38
36
37
+ The unused ``ContourLabeler.get_real_label_width `` method is deprecated.
39
38
40
- Removal of deprecated contouring code
41
- -------------------------------------
39
+ The unused ``FigureManagerBase.show_popup `` method is deprecated. This
40
+ introduced in e945059b327d42a99938b939a1be867fa023e7ba in 2005 but never built
41
+ out into any of the backends.
42
42
43
- Contouring no longer supports ``legacy `` corner masking.
43
+ :class: `backend_tkagg.AxisMenu ` is deprecated, as it has become
44
+ unused since the removal of "classic" toolbars.
44
45
45
- The deprecated ``ContourSet.vmin `` and ``ContourSet.vmax `` properties have been
46
- removed.
47
46
47
+ Changed function signatures
48
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~
48
49
49
- Removal of deprecated features
50
- ------------------------------
50
+ kwarg `` fig `` to ` .GridSpec.get_subplot_params ` is
51
+ deprecated, use `` figure `` instead.
51
52
52
- The `` matplotlib.finance ``, `` mpl_toolkits.exceltools `` and
53
- `` mpl_toolkits.gtktools `` modules have been removed. `` matplotlib.finance ``
54
- remains available at https://github.com/matplotlib/mpl_finance .
53
+ Using ` .pyplot.axes ` with an ` .Axes ` as argument is deprecated. This sets
54
+ the current axes, i.e. it has the same effect as ` .pyplot.sca `. For clarity
55
+ `` plt.sca(ax) `` should be preferred over `` plt.axes(ax) `` .
55
56
56
- The ``mpl_toolkits.mplot3d.art3d.iscolor `` function has been removed.
57
57
58
- The ``Axes.get_axis_bgcolor ``, ``Axes.set_axis_bgcolor ``,
59
- ``Bbox.update_from_data ``, ``Bbox.update_datalim_numerix ``,
60
- ``MaxNLocator.bin_boundaries `` methods have been removed.
58
+ Using strings instead of booleans to control grid and tick visibility
59
+ is deprecated. Using ``"on" ``, ``"off" ``, ``"true" ``, or ``"false" ``
60
+ to control grid and tick visibility has been deprecated. Instead, use
61
+ normal booleans (``True ``/``False ``) or boolean-likes. In the future,
62
+ all non-empty strings may be interpreted as ``True ``.
61
63
62
- The ``bgcolor `` keyword argument to ``Axes `` has been removed.
64
+ When given 2D inputs with non-matching numbers of columns, `~.pyplot.plot `
65
+ currently cycles through the columns of the narrower input, until all the
66
+ columns of the wider input have been plotted. This behavior is deprecated; in
67
+ the future, only broadcasting (1 column to *n * columns) will be performed.
63
68
64
- The ``spectral `` colormap has been removed. The ``Vega* `` colormaps, which
65
- were aliases for the ``tab* `` colormaps, have been removed.
66
69
67
- ``mencoder `` can no longer be used to encode animations.
70
+ rcparams
71
+ ~~~~~~~~
68
72
69
- Passing ``None `` instead of ``"none" `` as format to `~.Axes.errorbar ` is no
70
- longer supported.
73
+ The :rc: `backend.qt4 ` and :rc: `backend.qt5 ` rcParams were deprecated
74
+ in version 2.2. In order to force the use of a specific Qt binding,
75
+ either import that binding first, or set the ``QT_API `` environment
76
+ variable.
71
77
78
+ Deprecation of the ``nbagg.transparent `` rcParam. To control
79
+ transparency of figure patches in the nbagg (or any other) backend,
80
+ directly set ``figure.patch.facecolor ``, or the ``figure.facecolor ``
81
+ rcParam.
72
82
73
- `Figure.set_figwidth ` and `Figure.set_figheight ` default forward to True
74
- ------------------------------------------------------------------------
75
83
76
- `matplotlib.Figure.set_figwidth ` and `matplotlib.Figure.set_figheight `
77
- had the kwarg `forward=False `
78
- by default, but `Figure.set_size_inches ` now defaults to `forward=True `.
79
- This makes these functions conistent.
80
84
85
+ Removals
86
+ --------
81
87
82
- Do not truncate svg sizes to nearest point
83
- ------------------------------------------
88
+ Function Signatures
89
+ ~~~~~~~~~~~~~~~~~~~
84
90
85
- There is no reason to size the SVG out put in integer points, change
86
- to out putting floats for the * height *, * width *, and * viewBox * attributes
87
- of the * svg * element .
91
+ Contouring no longer supports `` legacy `` corner masking. The
92
+ deprecated `` ContourSet.vmin `` and `` ContourSet.vmax `` properties have
93
+ been removed .
88
94
95
+ Passing ``None `` instead of ``"none" `` as format to `~.Axes.errorbar ` is no
96
+ longer supported.
89
97
90
- Deprecations
91
- ------------
98
+ The ``bgcolor `` keyword argument to ``Axes `` has been removed.
92
99
93
- The unused and untested `` Artist.onRemove `` and `` Artist.hitlist `` methods have
94
- been deprecated.
100
+ Modules, methods, and functions
101
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
95
102
103
+ The ``matplotlib.finance ``, ``mpl_toolkits.exceltools `` and
104
+ ``mpl_toolkits.gtktools `` modules have been removed. ``matplotlib.finance ``
105
+ remains available at https://github.com/matplotlib/mpl_finance.
96
106
97
- Deprecations
98
- ------------
107
+ The ``mpl_toolkits.mplot3d.art3d.iscolor `` function has been removed.
99
108
100
- When given 2D inputs with non-matching numbers of columns, `~.pyplot.plot `
101
- currently cycles through the columns of the narrower input, until all the
102
- columns of the wider input have been plotted. This behavior is deprecated; in
103
- the future, only broadcasting (1 column to *n * columns) will be performed.
109
+ The ``Axes.get_axis_bgcolor ``, ``Axes.set_axis_bgcolor ``,
110
+ ``Bbox.update_from_data ``, ``Bbox.update_datalim_numerix ``,
111
+ ``MaxNLocator.bin_boundaries `` methods have been removed.
104
112
113
+ ``mencoder `` can no longer be used to encode animations.
105
114
106
- Deprecations
107
- ------------
115
+ The unused ` FONT_SCALE ` and ` fontd ` attributes of the ` RendererSVG `
116
+ class have been removed.
108
117
109
- The now unused `` mlab.less_simple_linear_interpolation `` function is
110
- deprecated.
118
+ color maps
119
+ ~~~~~~~~~~
111
120
121
+ The ``spectral `` colormap has been removed. The ``Vega* `` colormaps, which
122
+ were aliases for the ``tab* `` colormaps, have been removed.
112
123
113
- Deprecation of unused methods
114
- -----------------------------
115
124
116
- The unused ``ContourLabeler.get_real_label_width `` method is deprecated.
125
+ rcparams
126
+ ~~~~~~~~
117
127
128
+ The following deprecated rcParams have been removed:
118
129
119
- Deprecations
120
- ------------
130
+ - ``axes.color_cycle `` (see ``axes.prop_cycle ``),
131
+ - ``legend.isaxes ``,
132
+ - ``svg.embed_char_paths `` (see ``svg.fonttype ``),
133
+ - ``text.fontstyle ``, ``text.fontangle ``, ``text.fontvariant ``,
134
+ ``text.fontweight ``, ``text.fontsize `` (renamed to ``text.style ``, etc.),
135
+ - ``tick.size `` (renamed to ``tick.major.size ``).
121
136
122
- The unused ``FigureManagerBase.show_popup `` method is deprecated. This
123
- introduced in e945059b327d42a99938b939a1be867fa023e7ba in 2005 but never built
124
- out into any of the backends.
125
137
126
138
127
139
Removal of unused imports
@@ -132,12 +144,32 @@ trying to import certain classes or functions from the "wrong" module
132
144
:mod: `matplotlib.figure `) will now raise an `ImportError `.
133
145
134
146
135
- Deprecations
136
- ------------
147
+ Exception type changes
148
+ ----------------------
137
149
138
- Using `.pyplot.axes ` with an `.Axes ` as argument is deprecated. This sets
139
- the current axes, i.e. it has the same effect as `.pyplot.sca `. For clarity
140
- ``plt.sca(ax) `` should be preferred over ``plt.axes(ax) ``.
150
+ If `MovieWriterRegistry ` can't find the requested `MovieWriter `, a
151
+ more helpful `RuntimeError ` message is now raised instead of the
152
+ previously raised `KeyError `.
153
+
154
+ `~.tight_layout.auto_adjust_subplotpars ` now raises `ValueError `
155
+ instead of `RuntimeError ` when sizes of input lists don't match
156
+
157
+
158
+ `Figure.set_figwidth ` and `Figure.set_figheight ` default forward to True
159
+ ------------------------------------------------------------------------
160
+
161
+ `matplotlib.Figure.set_figwidth ` and `matplotlib.Figure.set_figheight `
162
+ had the kwarg `forward=False `
163
+ by default, but `Figure.set_size_inches ` now defaults to `forward=True `.
164
+ This makes these functions conistent.
165
+
166
+
167
+ Do not truncate svg sizes to nearest point
168
+ ------------------------------------------
169
+
170
+ There is no reason to size the SVG out put in integer points, change
171
+ to out putting floats for the *height *, *width *, and *viewBox * attributes
172
+ of the *svg * element.
141
173
142
174
143
175
Fontsizes less than 1 pt are clipped to be 1 pt.
@@ -152,36 +184,6 @@ FreeType. This change makes it so no backends can use fonts smaller than
152
184
backends.
153
185
154
186
155
- Deprecation of the ``nbagg.transparent `` rcParam
156
- ------------------------------------------------
157
-
158
- To control transparency of figure patches in the nbagg (or any other) backend,
159
- directly set ``figure.patch.facecolor ``, or the ``figure.facecolor `` rcParam.
160
-
161
-
162
- Removal of deprecated rcParams
163
- ------------------------------
164
-
165
- The following deprecated rcParams have been removed:
166
-
167
- - ``axes.color_cycle `` (see ``axes.prop_cycle ``),
168
- - ``legend.isaxes ``,
169
- - ``svg.embed_char_paths `` (see ``svg.fonttype ``),
170
- - ``text.fontstyle ``, ``text.fontangle ``, ``text.fontvariant ``,
171
- ``text.fontweight ``, ``text.fontsize `` (renamed to ``text.style ``, etc.),
172
- - ``tick.size `` (renamed to ``tick.major.size ``).
173
-
174
-
175
- `~.tight_layout.auto_adjust_subplotpars ` now raises `ValueError ` instead of `RuntimeError ` when sizes of input lists don't match
176
- --------------------------------------------------------------------------------------------------------------------------------
177
-
178
-
179
- Deprecation of backend_tkagg.AxisMenu
180
- -------------------------------------
181
-
182
- The above-mentioned class is deprecated, as it has become unused since the
183
- removal of "classic" toolbars.
184
-
185
187
186
188
Changes to Qt backend class MRO
187
189
-------------------------------
@@ -259,29 +261,13 @@ and ::
259
261
260
262
261
263
262
- Removed attributes
263
- ------------------
264
-
265
- The unused `FONT_SCALE ` and `fontd ` attributes of the `RendererSVG ` class have
266
- been removed.
267
-
268
-
269
- API changes for ``constrained_layout ``
270
- ----------------------------------------
264
+ New dependency
265
+ --------------
271
266
272
- The new constrained_layout functionality has some minor (largely backwards-
273
- compatible) API changes. See
267
+ ` kiwisolver < https://github.com/nucleic/kiwi >`__ is now a required
268
+ dependency to support the new constrained_layout, see
274
269
:ref: `sphx_glr_tutorials_intermediate_constrainedlayout_guide.py ` for
275
- more details on this functionality.
276
-
277
- This requires a new dependency on kiwisolver _.
278
-
279
- _https://github.com/nucleic/kiwi
280
-
281
- kwarg ``fig `` deprectated in `.GridSpec.get_subplot_params `
282
- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
283
-
284
- Use ``figure `` instead of ``fig ``, which is now deprecated.
270
+ more details.
285
271
286
272
287
273
`Axes.imshow ` clips RGB values to the valid range
@@ -293,15 +279,6 @@ The old behaviour, wrapping back in to the range, often hid outliers
293
279
and made interpreting RGB images unreliable.
294
280
295
281
296
- Deprecation of qt binding rcparams
297
- ----------------------------------
298
-
299
- The :rc: `backend.qt4 ` and :rc: `backend.qt5 ` rcParams were deprecated
300
- in version 2.2. In order to force the use of a specific Qt binding,
301
- either import that binding first, or set the ``QT_API `` environment
302
- variable.
303
-
304
-
305
282
GTKAgg and GTKCairo backends deprecated
306
283
---------------------------------------
307
284
0 commit comments