1
1
API Changes for 3.1.0
2
2
=====================
3
3
4
+ Testing
5
+ -------
6
+
7
+ The ``--no-network `` flag to ``tests.py `` has been removed (no test requires
8
+ internet access anymore). If it is desired to disable internet access both for
9
+ old and new versions of Matplotlib, use ``tests.py -m 'not network' `` (which is
10
+ now a no-op).
11
+
12
+ The image comparison test decorators now skip (rather than xfail) the test for
13
+ uncomparable formats. The affected decorators are `~.image_comparison ` and
14
+ `~.check_figures_equal `. The deprecated `~.ImageComparisonTest ` class is
15
+ likewise changed.
16
+
4
17
Dependency changes
5
18
------------------
6
19
@@ -42,8 +55,22 @@ The following API elements have been removed:
42
55
- ``font_manager.cachedir ``
43
56
- ``__version__numpy__ ``
44
57
45
- Deprecations
46
- ------------
58
+ Signature deprecations
59
+ ----------------------
60
+ The following signature related behaviours are deprecated:
61
+
62
+ - The ``withdash `` keyword argument to ``text() ``. Consider using
63
+ ``annotate() `` instead.
64
+ - Passing (n, 1)-shaped error arrays to errorbar(), which was not
65
+ documented and did not work for ``n = 2 ``. Pass a 1D array instead.
66
+ - The ``frameon `` kwarg to ``savefig `` and the ``savefig.frameon `` rcParam.
67
+ To emulate ``frameon = False ``, set ``facecolor `` to fully
68
+ transparent (``"none" ``, or ``(0, 0, 0, 0) ``).
69
+ - Passing a non-1D (typically, (n, 1)-shaped) input to `Axes.pie `.
70
+ Pass a 1D array instead.
71
+
72
+ Class/method/attribute deprecations
73
+ -----------------------------------
47
74
48
75
- ``Spine.is_frame_like ``
49
76
@@ -78,6 +105,99 @@ different behavior from the 2D Axis' `axis.Axis.get_ticks_position` method.
78
105
- ``dates.hours() ``
79
106
- ``dates.weeks() ``
80
107
108
+ - ``axes3d.Axes3D.w_xaxis ``
109
+ - ``axes3d.Axes3D.w_yaxis ``
110
+ - ``axes3d.Axes3D.w_zaxis ``
111
+
112
+ Use ``axes3d.Axes3D.xaxis ``, ``axes3d.Axes3D.yaxis ``,
113
+ and ``axes3d.Axes3D.zaxis `` instead.
114
+
115
+ - ``cbook.dedent ``
116
+ - ``docstring.Appender ``
117
+ - ``docstring.dedent ``
118
+ - ``docstring.copy_dedent ``
119
+
120
+ Use the standard library's docstring manipulation tools instead, such as
121
+ `inspect.cleandoc ` and `inspect.getdoc `.
122
+
123
+ - ``matplotlib.testing.decorators.switch_backend `` decorator
124
+
125
+ Test functions should use ``pytest.mark.backend(...) ``, and the mark will be
126
+ picked up by the ``matplotlib.testing.conftest.mpl_test_settings `` fixture.
127
+
128
+ - ``.color `` attribute of `Quiver ` objects
129
+
130
+ Instead, use (as for any `Collection `) the ``get_facecolor `` method.
131
+ Note that setting to the ``.color `` attribute did not update the quiver artist,
132
+ whereas calling ``set_facecolor `` does.
133
+
134
+ - ``matplotlib.scale.get_scale_docs() ``
135
+ - ``matplotlib.pyplot.get_scale_docs() ``
136
+
137
+ These are considered internal and will be removed from the public API in a
138
+ future version.
139
+
140
+ - ``get_py2exe_datafiles ``
141
+ - ``tk_window_focus ``
142
+
143
+ - ``backend_gtk3.FileChooserDialog ``
144
+ - ``backend_gtk3.NavigationToolbar2GTK3.get_filechooser ``
145
+ - ``backend_gtk3.SaveFigureGTK3.get_filechooser ``
146
+
147
+ - ``backend_ps.PsBackendHelper ``, ``backend_ps.ps_backend_helper ``,
148
+
149
+ - ``cbook.iterable ``
150
+ - ``cbook.get_label ``
151
+
152
+ - ``font_manager.OSXInstalledFonts ``
153
+
154
+ - ``mlab.demean ``
155
+
156
+ - ``TextToPath.glyph_to_path ``
157
+
158
+ Instead call ``font.get_path() `` and manually transform the path.
159
+
160
+ - ``matplotlib.ticker.MaxNLocator.default_params `` class variable
161
+
162
+ The defaults are not supposed to be user-configurable.
163
+
164
+ - ``NavigationToolbar2QT.adj_window `` attribute
165
+
166
+ This is unused and always ``None ``.
167
+
168
+ - ``LogTransformBase ``
169
+ - ``Log10Transform ``
170
+ - ``Log2Transform ``,
171
+ - ``NaturalLogTransformLog ``
172
+ - ``InvertedLogTransformBase ``
173
+ - ``InvertedLog10Transform ``
174
+ - ``InvertedLog2Transform ``
175
+ - ``InvertedNaturalLogTransform ``
176
+
177
+ These classes defined in :mod: `matplotlib.scales ` are deprecated.
178
+ As a replacement, use the general `LogTransform ` and `InvertedLogTransform `
179
+ classes, whose constructors take a *base * argument.
180
+
181
+ - ``path.get_paths_extents ``
182
+
183
+ Use `~.path.get_path_collection_extents ` instead.
184
+
185
+ - ``Path.has_nonfinite `` attribute
186
+
187
+ Use ``not np.isfinite(path.vertices).all() `` instead.
188
+
189
+ - ``text.TextWithDash ``
190
+
191
+
192
+ - ``NavigationToolbar2QT.buttons ``
193
+ - ``Line2D.verticalOffset ``
194
+ - ``Quiver.keytext ``
195
+ - ``Quiver.keyvec ``
196
+ - ``SpanSelector.buttonDown ``
197
+
198
+ These are unused and never updated.
199
+
200
+ - ``GraphicsContextPS.shouldstroke ``
81
201
82
202
`Text ` now has a ``c `` alias for the ``color `` property
83
203
-------------------------------------------------------
@@ -218,13 +338,6 @@ API changes
218
338
The arguments of `matplotlib.testing.compare.calculate_rms ` have been renamed
219
339
from ``expectedImage, actualImage ``, to ``expected_image, actual_image ``.
220
340
221
- Deprecations
222
- ------------
223
-
224
- The ``matplotlib.testing.decorators.switch_backend `` decorator is deprecated.
225
- Test functions should use ``pytest.mark.backend(...) ``, and the mark will be
226
- picked up by the ``matplotlib.testing.conftest.mpl_test_settings `` fixture.
227
-
228
341
Matplotlib.use now has an ImportError for interactive backend
229
342
-------------------------------------------------------------
230
343
@@ -254,21 +367,6 @@ a non-mathtext string with ``usetex=False`` would rely on the mathtext parser
254
367
(but not on usetex support!) to parse the string. The mathtext parser is not
255
368
invoked anymore, which may cause slight changes in glyph positioning.
256
369
257
- Deprecations
258
- ------------
259
-
260
- The ``.color `` attribute of `Quiver ` objects is deprecated. Instead, use (as
261
- for any `Collection `) the ``get_facecolor `` method. Note that setting to the
262
- ``.color `` attribute did not update the quiver artist, whereas calling
263
- ``set_facecolor `` does.
264
-
265
- Deprecations
266
- ------------
267
-
268
- The function ``matplotlib.scale.get_scale_docs() `` and its alias
269
- ``matplotlib.pyplot.get_scale_docs() `` are considered internal and will be
270
- removed from the public API in a future version.
271
-
272
370
Passing a single string as *labels * to `Sankey.add `
273
371
---------------------------------------------------
274
372
@@ -282,38 +380,9 @@ is passed, it is used to label all the flows.
282
380
API deprecations
283
381
----------------
284
382
285
- The following API elements are deprecated:
286
-
287
- - ``get_py2exe_datafiles ``, ``tk_window_focus ``,
288
- - ``backend_gtk3.FileChooserDialog ``,
289
- ``backend_gtk3.NavigationToolbar2GTK3.get_filechooser ``,
290
- ``backend_gtk3.SaveFigureGTK3.get_filechooser ``,
291
- - ``backend_ps.PsBackendHelper ``, ``backend_ps.ps_backend_helper ``,
292
- - ``cbook.iterable ``,
293
- - ``cbook.get_label ``, ``cbook.iterable ``,
294
- - ``font_manager.OSXInstalledFonts ``,
295
- - ``mlab.demean ``,
296
-
297
383
The following environment variables are deprecated:
298
384
- ``MATPLOTLIBDATA ``,
299
385
300
- Deprecations
301
- ------------
302
-
303
- The ``Path.has_nonfinite `` attribute is deprecated (use ``not
304
- np.isfinite(path.vertices).all() `` instead).
305
-
306
- Deprecations
307
- ------------
308
- 
309
- ``TextToPath.glyph_to_path `` is deprecated (call ``font.get_path() `` and
310
- manually transform the path instead).
311
-
312
- Deprecations
313
- ------------
314
-
315
- The (unused and always None) ``NavigationToolbar2QT.adj_window `` attribute is
316
- deprecated.
317
386
318
387
``OldScalarFormatter.pprint_val ``, ``ScalarFormatter.pprint_val ``, and ``LogFormatter.pprint_val `` are deprecated
319
388
-----------------------------------------------------------------------------------------------------------------
@@ -466,9 +535,7 @@ on a 3D axes now raises a ``NotImplementedError``.
466
535
Deprecations
467
536
------------
468
537
469
- The class variable ``matplotlib.ticker.MaxNLocator.default_params `` is
470
- deprecated and will be removed in a future version. The defaults are not
471
- supposed to be user-configurable.
538
+
472
539
473
540
``matplotlib.ticker.MaxNLocator `` and its ``set_params `` method will issue
474
541
a warning on unknown keyword arguments instead of silently ignoring them.
@@ -483,9 +550,7 @@ nothing; this now is equivalent to calling ``add_subplot(111)`` instead.
483
550
Deprecations
484
551
------------
485
552
486
- The following (unused and never updated) attributes are deprecated:
487
- ``NavigationToolbar2QT.buttons ``, ``Line2D.verticalOffset ``, ``Quiver.keytext ``,
488
- ``Quiver.keyvec ``, ``SpanSelector.buttonDown ``.
553
+
489
554
490
555
The ``interp_at_native `` parameter to ``BboxImage ``, which has no effect since
491
556
Matplotlib 2.0, is deprecated.
@@ -508,16 +573,6 @@ instead, or rely on numpy to do it).
508
573
See Whats new for details. The previous behavior can be achieved by passing
509
574
``shade=False ``.
510
575
511
- Deprecations
512
- ------------
513
-
514
- - The ``LogTransformBase ``, ``Log10Transform ``, ``Log2Transform ``,
515
- ``NaturalLogTransformLog ``, ``InvertedLogTransformBase ``,
516
- ``InvertedLog10Transform ``, ``InvertedLog2Transform ``, and
517
- ``InvertedNaturalLogTransform `` classes (all defined in
518
- :mod: `matplotlib.scales `) are deprecated. As a replacement, use the general
519
- `LogTransform ` and `InvertedLogTransform ` classes, whose constructors take a
520
- *base * argument.
521
576
522
577
Changes to search paths for FreeType and libpng
523
578
-----------------------------------------------
@@ -613,8 +668,8 @@ Previously, when a weight string was passed to `FontManager.score_weight`,
613
668
614
669
`FontManager.score_weight ` now raises an exception on such inputs.
615
670
616
- Removal of deprecated :mod: `matplotlib.mlab ` code
617
- -------------------------------------------------
671
+ :mod: `matplotlib.mlab ` removals
672
+ -------------------------------
618
673
619
674
Lots of code inside the :mod: `matplotlib.mlab ` module which was deprecated
620
675
in Matplotlib 2.2 has been removed. See below for a list:
@@ -772,9 +827,6 @@ take the renderer as argument anymore (that argument is unused).
772
827
Deprecations
773
828
------------
774
829
775
- The ``text.TextWithDash `` class and the ``withdash `` keyword argument to
776
- ``text() `` is deprecated. Consider using ``annotate() `` instead.
777
-
778
830
`~Axes.bxp ` now respects :rc: `boxplot.boxprops.linewidth ` even when *patch_artist * is set
779
831
-----------------------------------------------------------------------------------------
780
832
@@ -829,26 +881,11 @@ Passing 'normal' to `Axes.axis()` is deprecated
829
881
830
882
Use ``axis('auto') `` instead.
831
883
832
-
833
- The image comparison test decorators now skip (rather than xfail) the test for uncomparable formats
834
- ---------------------------------------------------------------------------------------------------
835
-
836
- The affected decorators are `~.image_comparison ` and `~.check_figures_equal `.
837
- The deprecated `~.ImageComparisonTest ` class is likewise changed.
838
- :orphan:
839
-
840
884
Drop support for ``pgi `` in the GTK3 backends
841
885
---------------------------------------------
842
886
``pgi ``, an alternative implementation to PyGObject, is no longer supported in
843
887
the GTK3 backends. PyGObject should be used instead.
844
888
845
- API changes
846
- -----------
847
-
848
- The ``--no-network `` flag to ``tests.py `` has been removed (no test requires
849
- internet access anymore). If it is desired to disable internet access both for
850
- old and new versions of Matplotlib, use ``tests.py -m 'not network' `` (which is
851
- now a no-op).
852
889
853
890
Minor ticks that collide with major ticks are always hidden
854
891
-----------------------------------------------------------
@@ -899,7 +936,7 @@ The ``collections.CIRCLE_AREA_FACTOR`` constant has been removed.
899
936
Deprecations
900
937
------------
901
938
902
- `` GraphicsContextPS.shouldstroke `` is deprecated.
939
+
903
940
904
941
Stricter `~.Axes.plot ` format string parsing
905
942
--------------------------------------------
@@ -910,12 +947,6 @@ specifying more than one linestyle (e.g. ``"---."`` which specifies both
910
947
911
948
This now raises a ValueError instead.
912
949
913
- Deprecations
914
- ------------
915
-
916
- ``path.get_paths_extents `` is deprecated; use
917
- `~.path.get_path_collection_extents ` instead.
918
-
919
950
API changes
920
951
-----------
921
952
@@ -929,28 +960,9 @@ deprecated.
929
960
Deprecations
930
961
------------
931
962
932
- Passing a non-1D (typically, (n, 1)-shaped) input to `Axes.pie ` is deprecated.
933
- Pass a 1D array instead.
934
-
935
- Deprecations
936
- ------------
937
-
938
963
The `TextPath ` constructor used to silently drop ignored arguments; this
939
964
behavior is deprecated.
940
965
941
- Deprecations
942
- ------------
943
-
944
- The ``frameon `` kwarg to ``savefig `` and the ``savefig.frameon `` rcParam
945
- are deprecated. To emulate ``frameon = False ``, set ``facecolor `` to fully
946
- transparent (``"none" ``, or ``(0, 0, 0, 0) ``).
947
-
948
- Deprecations
949
- ------------
950
-
951
- ``cbook.dedent ``, ``docstring.Appender ``, ``docstring.dedent ``, and
952
- ``docstring.copy_dedent `` are deprecated (use the standard library's docstring
953
- manipulation tools, such as `inspect.cleandoc ` and `inspect.getdoc ` instead).
954
966
955
967
Changes to `matplotlib.axes.Axes.spy `
956
968
-------------------------------------
@@ -1006,16 +1018,9 @@ function, except the first one (the version where the deprecation occurred),
1006
1018
are now keyword-only. The goal is to avoid accidentally setting the "message"
1007
1019
argument when the "name" (or "alternative") argument was intended, as this has
1008
1020
repeatedly occurred in the past.
1009
- Deprecations
1010
- ````````````
1011
-
1012
- Support for passing (n, 1)-shaped error arrays to errorbar(), which was not
1013
- documented and did not work for ``n = 2 ``, is deprecated (pass a 1D array
1014
- instead).
1015
-
1016
1021
1017
- Removal of deprecated :mod: `matplotlib.pylab ` code
1018
- --------------------------------------------------
1022
+ :mod: `matplotlib.pylab ` removals
1023
+ --------------------------------
1019
1024
1020
1025
Lots of code inside the :mod: `matplotlib.mlab ` module which was deprecated
1021
1026
in Matplotlib 2.2 has been removed. This means the following functions are
@@ -1067,13 +1072,6 @@ no longer available in the `matplotlib.pylab` module:
1067
1072
- ``stineman_interp ``
1068
1073
- ``vector_lengths ``
1069
1074
1070
- Deprecations
1071
- ------------
1072
-
1073
- ``axes3d.Axes3D.w_xaxis ``, ``.w_yaxis ``, and ``.w_zaxis `` are deprecated (use
1074
- ``.xaxis ``, ``.yaxis ``, and ``.zaxis `` instead).
1075
-
1076
-
1077
1075
Autoscaling changes
1078
1076
-------------------
1079
1077
0 commit comments