@@ -15,13 +15,140 @@ For new features that were added to matplotlib, please see
15
15
Changes in 2.0.0
16
16
================
17
17
18
+
19
+
20
+ Deprecation and removal
21
+ -----------------------
22
+
18
23
Color of Axes
19
- -------------
24
+ `````````````
20
25
21
26
The ``axisbg `` and ``axis_bgcolor `` properties on ``Axes `` have been
22
27
deprecated in favor of ``facecolor ``.
23
28
24
29
30
+ GTK and GDK backends deprecated
31
+ ```````````````````````````````
32
+ The untested and broken GDK and GTK backends have been deprecated.
33
+ These backends allows figures to be rendered via the GDK api to
34
+ files and GTK2 figures. They are untested, known to be broken and
35
+ use have been discouraged for some time. The `GTKAgg ` and `GTKCairo ` backends
36
+ provide better and more tested ways of rendering figures to GTK2 windows.
37
+
38
+ WX backend deprecated
39
+ `````````````````````
40
+ The untested WX backend has been deprecated.
41
+ This backend allows figures to be rendered via the WX api to
42
+ files and Wx figures. It is untested, and
43
+ use have been discouraged for some time. The `WXAgg ` backend
44
+ provides a better and more tested way of rendering figures to WX windows.
45
+
46
+ CocoaAgg backend removed
47
+ ````````````````````````
48
+
49
+ The deprecated and not fully functional CocoaAgg backend has been removed
50
+
51
+
52
+ General
53
+ -------
54
+
55
+ `Artist.update ` has return value
56
+ ````````````````````````````````
57
+
58
+ The methods `matplotlib.artist.Artist.set `,
59
+ `matplotlib.Artist.update `, and the function `matplotlib.artist.setp `
60
+ now use a common codepath to look up how to update the given artist
61
+ properties (either using the setter methods or an attribute/property).
62
+
63
+ The behavior of `matplotlib.Artist.update ` is slightly changed to
64
+ return a list of the returned values from the setter methods to avoid
65
+ changing the API of `matplotlib.Artist.set ` and
66
+ `matplotlib.artist.setp `.
67
+
68
+ The keys passed into `matplotlib.Artist.update ` are now converted to
69
+ lower case before being processed to match the behavior of
70
+ `matplotlib.Artist.set ` and `matplotlib.artist.setp `. This should not
71
+ break any user code because there are no set methods with capitals in
72
+ the names, however going forward this puts a constraint on naming
73
+ properties.
74
+
75
+
76
+ `Legend ` initializers gain edgecolor and facecolor kwargs
77
+ ``````````````````````````````````````````````````````````
78
+
79
+ The :class: `~matplotlib.legend.Legend ` background patch (or 'frame')
80
+ can have its `edgecolor ` and `facecolor ` determined by the
81
+ corresponding keyword arguments to its initializer, or to any of the
82
+ methods or functions that call that initializer. If left to
83
+ their default values of `None `, their values will be taken from
84
+ `rcParams `. The previously-existing `framealpha ` kwarg still
85
+ controls the alpha transparency of the patch.
86
+
87
+
88
+ Qualitative colormaps
89
+ `````````````````````
90
+
91
+ Colorbrewer's qualitative/discrete colormaps ("Accent", "Dark2", "Paired",
92
+ "Pastel1", "Pastel2", "Set1", "Set2", "Set3") are now implemented as
93
+ ``ListedColormap `` instead of ``LinearSegmentedColormap ``.
94
+
95
+ To use these for images where categories are specified as integers, for
96
+ instance, use::
97
+
98
+ plt.imshow(x, cmap='Dark2', norm=colors.NoNorm())
99
+
100
+
101
+ Change in the ``draw_image `` backend API
102
+ ----------------------------------------
103
+
104
+ The ``draw_image `` method implemented by backends has changed its interface.
105
+
106
+ This change is only relevant if the backend declares that it is able
107
+ to transform images by returning ``True `` from ``option_scale_image ``.
108
+ See the ``draw_image `` docstring for more information.
109
+
110
+
111
+ Tickers
112
+ -------
113
+
114
+ ``matplotlib.ticker.LinearLocator `` algorithm update
115
+ ````````````````````````````````````````````````````
116
+
117
+ The ``matplotlib.ticker.LinearLocator `` is used to define the range and location
57AE
118
+ of tickmarks of a plot when the user wants a exact number of ticks.
119
+ ``LinearLocator `` thus differs from the default locator ``MaxNLocator ``, which
120
+ does not necessarily return the exact user requested number of ticks.
121
+
122
+ The view range algorithm in ``matplotlib.ticker.LinearLocator `` has been
123
+ changed so that more convenient tick location are chosen. The new algorithm
124
+ returns a plot view range that is a multiple of the user requested number of
125
+ ticks. This ensures tick marks to be located at whole integers more
126
+ constistently. For example, when both y-axis of a``twinx`` plot use
127
+ ``matplotlib.ticker.LinearLocator `` with the same number of ticks, the grids of
128
+ both axis will be properly aligned at convenient tick locations.
129
+
130
+
131
+ MPlot3D
132
+ -------
133
+
134
+ New defaults for 3D quiver function in mpl_toolkits.mplot3d.axes3d.py
135
+ `````````````````````````````````````````````````````````````````````
136
+ Matplotlib has both a 2D and a 3D ``quiver `` function. These changes affect only the 3D function and make the default behavior of the 3D function match 2D version. There are two changes:
137
+
138
+ 1) The 3D quiver function previously normalized the arrows to be the same length, which makes it unusable for situations where the arrows should be different lengths and does not match the behavior of the 2D function. This normalization behavior is now controlled with the ``normalize `` keyword, which defaults to False.
139
+
140
+ 2) The ``pivot `` keyword now defaults to ``tail `` instead of ``tip ``. This was done in order to match the default behavior of the 2D quiver function.
141
+
142
+ To obtain the previous behavior with the 3D quiver function, one can call the function with ::
143
+
144
+ ax.quiver(x, y, z, u, v, w, normalize=True, pivot='tip')
145
+
146
+ where "ax" is a axes3d object created with something like ::
147
+
148
+ import mpl_toolkits.mplot3d.axes3d
149
+ ax = plt.sublot(111, projection='3d')
150
+
151
+
25
152
Changes in 1.5.2
26
153
================
27
154
0 commit comments