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

Skip to content

Commit bc3654c

Browse files
committed
Reorganize what's new and api changes
1 parent 0eea7b8 commit bc3654c

File tree

2 files changed

+298
-246
lines changed

2 files changed

+298
-246
lines changed

doc/api/api_changes.rst

Lines changed: 76 additions & 61 deletions
Original file line numberDiff line numberDiff line change
@@ -17,18 +17,8 @@ For new features that were added to matplotlib, please see
1717
Changes in 1.3.x
1818
================
1919

20-
* Data limits on a plot now start from a point of having "null"
21-
limits, rather than limits in the range (0, 1). This has an effect
22-
on artists that only control limits in one direction, such as
23-
`axvline` and `axhline`, since their limits will not longer also
24-
include the range (0, 1). This fixes some problems where the
25-
computed limits would be dependent on the order in which artists
26-
were added to the axes.
27-
28-
* On Linux, the user-specific `matplotlibrc` configuration file is now
29-
located in `~/.config/matplotlib/matplotlibrc` to conform to the
30-
`XDG Base Directory Specification
31-
<http://standards.freedesktop.org/basedir-spec/basedir-spec-latest.html>`_.
20+
Code removal
21+
------------
3222

3323
* The following items that were deprecated in version 1.2 or earlier
3424
have now been removed completely.
@@ -77,6 +67,9 @@ Changes in 1.3.x
7767
- `widgets.HorizontalSpanSelector` has been removed. Use
7868
`widgets.SpanSelector` instead.
7969

70+
Code deprecation
71+
----------------
72+
8073
* The CocoaAgg backend has been deprecated, with the possibility for
8174
deletion or resurrection in a future release.
8275

@@ -96,6 +89,47 @@ Changes in 1.3.x
9689
- `points_in_path` -> `path.Path.contains_points`
9790
- `clip_path_to_rect` -> `path.Path.clip_to_bbox`
9891

92+
* `matplotlib.colors.normalize` and `matplotlib.colors.no_norm` have
93+
been deprecated in favour of `matplotlib.colors.Normalize` and
94+
`matplotlib.colors.NoNorm` respectively.
95+
96+
* The `ScalarMappable` class' `set_colorbar` is now
97+
deprecated. Instead, the
98+
:attr:`matplotlib.cm.ScalarMappable.colorbar` attribute should be
99+
used. In previous matplotlib versions this attribute was an
100+
undocumented tuple of ``(colorbar_instance, colorbar_axes)`` but is
101+
now just ``colorbar_instance``. To get the colorbar axes it is
102+
possible to just use the
103+
:attr:`~matplotlib.colorbar.ColorbarBase.ax` attribute on a colorbar
104+
instance.
105+
106+
* The `~matplotlib.mpl` module is now deprecated. Those who relied on this
107+
module should transition to simply using ``import matplotlib as mpl``.
108+
109+
Code changes
110+
------------
111+
112+
* :class:`~matplotlib.patches.Patch` now fully supports using RGBA values for
113+
its ``facecolor`` and ``edgecolor`` attributes, which enables faces and
114+
edges to have different alpha values. If the
115+
:class:`~matplotlib.patches.Patch` object's ``alpha`` attribute is set to
116+
anything other than ``None``, that value will override any alpha-channel
117+
value in both the face and edge colors. Previously, if
118+
:class:`~matplotlib.patches.Patch` had ``alpha=None``, the alpha component
119+
of ``edgecolor`` would be applied to both the edge and face.
120+
121+
* The optional ``isRGB`` argument to
122+
:meth:`~matplotlib.backend_bases.GraphicsContextBase.set_foreground` (and
123+
the other GraphicsContext classes that descend from it) has been renamed to
124+
``isRGBA``, and should now only be set to ``True`` if the ``fg`` color
125+
argument is known to be an RGBA tuple.
126+
127+
* For :class:`~matplotlib.patches.Patch`, the ``capstyle`` used is now
128+
``butt``, to be consistent with the default for most other objects, and to
129+
avoid problems with non-solid ``linestyle`` appearing solid when using a
130+
large ``linewidth``. Previously, :class:`~matplotlib.patches.Patch` used
131+
``capstyle='projecting'``.
132+
99133
* `Path` objects can now be marked as `readonly` by passing
100134
`readonly=True` to its constructor. The built-in path singletons,
101135
obtained through `Path.unit*` class methods return readonly paths.
@@ -112,46 +146,33 @@ Changes in 1.3.x
112146
Deep copying a `Path` always creates an editable (i.e. non-readonly)
113147
`Path`.
114148

115-
* matplotlib.colors.normalize and matplotlib.colors.no_norm have been
116-
deprecated in favour of matplotlib.colors.Normalize and
117-
matplotlib.colors.NoNorm respectively.
118-
119-
* The `font.*` rcParams now affect only text objects created after the
120-
rcParam has been set, and will not retroactively affect already
121-
existing text objects. This brings their behavior in line with most
122-
other rcParams.
149+
* The list at ``Path.NUM_VERTICES`` was replaced by a dictionary mapping
150+
Path codes to the number of expected vertices at
151+
:attr:`~matplotlib.path.Path.NUM_VERTICES_FOR_CODE`.
123152

124153
* To support XKCD style plots, the :func:`matplotlib.path.cleanup_path`
125154
method's signature was updated to require a sketch argument. Users of
126155
:func:`matplotlib.path.cleanup_path` are encouraged to use the new
127156
:meth:`~matplotlib.path.Path.cleaned` Path method.
128157

129-
* The list at ``Path.NUM_VERTICES`` was replaced by a dictionary mapping
130-
Path codes to the number of expected vertices at
131-
:attr:`~matplotlib.path.Path.NUM_VERTICES_FOR_CODE`.
158+
* Data limits on a plot now start from a state of having "null"
159+
limits, rather than limits in the range (0, 1). This has an effect
160+
on artists that only control limits in one direction, such as
161+
`axvline` and `axhline`, since their limits will not longer also
162+
include the range (0, 1). This fixes some problems where the
163+
computed limits would be dependent on the order in which artists
164+
were added to the axes.
132165

133166
* Fixed a bug in setting the position for the right/top spine with data
134167
position type. Previously, it would draw the right or top spine at
135168
+1 data offset.
136169

137-
* The ScalarMappable class' set_colorbar is now deprecated. Instead, the
138-
:attr:`matplotlib.cm.ScalarMappable.colorbar` attribute should be used.
139-
In previous matplotlib versions this attribute was an undocumented tuple
140-
of ``(colorbar_instance, colorbar_axes)`` but is now just
141-
``colorbar_instance``. To get the colorbar axes it is possible to just use
142-
the :attr:`~matplotlib.colorbar.ColorbarBase.ax` attribute on a colorbar
143-
isntance.
144-
145-
* In :class:`~matplotlib.patches.FancyArrow`, the default arrow head width,
146-
``head_width``, has been made larger to produce a visible arrow head. The new
147-
value of this kwarg is ``head_width = 20 * width``.
148-
149-
* Removed call of :meth:`~matplotlib.axes.Axes.grid` in
150-
:meth:`~matplotlib.pyplot.plotfile`. To draw the axes grid, set the
151-
``axes.grid`` rcParam to *True*, or explicitly call
152-
:meth:`~matplotlib.axes.Axes.grid`.
170+
* In :class:`~matplotlib.patches.FancyArrow`, the default arrow head
171+
width, ``head_width``, has been made larger to produce a visible
172+
arrow head. The new value of this kwarg is ``head_width = 20 *
173+
width``.
153174

154-
* It is now posible to provide ``number of levels + 1`` colors in the case of
175+
* It is now possible to provide ``number of levels + 1`` colors in the case of
155176
`extend='both'` for contourf (or just ``number of levels`` colors for an
156177
extend value ``min`` or ``max``) such that the resulting colormap's
157178
``set_under`` and ``set_over`` are defined appropriately. Any other number
@@ -164,9 +185,6 @@ Changes in 1.3.x
164185
:class:`~matplotlib.colorbar.ColorbarBase` allows one to control the shape
165186
of colorbar extensions.
166187

167-
* The `~matplotlib.mpl` module is now deprecated. Those who relied on this
168-
module should transition to simply using ``import matplotlib as mpl``.
169-
170188
* The extension of :class:`~matplotlib.widgets.MultiCursor` to both vertical
171189
(default) and/or horizontal cursor implied that ``self.line`` is replaced
172190
by ``self.vline`` for vertical cursors lines and ``self.hline`` is added
@@ -179,26 +197,23 @@ Changes in 1.3.x
179197
* The :func:`matplotlib.cbook.check_output` function has been moved to
180198
:func:`matplotlib.compat.subprocess`.
181199

182-
* :class:`~matplotlib.patches.Patch` now fully supports using RGBA values for
183-
its ``facecolor`` and ``edgecolor`` attributes, which enables faces and
184-
edges to have different alpha values. If the
185-
:class:`~matplotlib.patches.Patch` object's ``alpha`` attribute is set to
186-
anything other than ``None``, that value will override any alpha-channel
187-
value in both the face and edge colors. Previously, if
188-
:class:`~matplotlib.patches.Patch` had ``alpha=None``, the alpha component
189-
of ``edgecolor`` would be applied to both the edge and face.
200+
Configuration and rcParams
201+
--------------------------
190202

191-
* The optional ``isRGB`` argument to
192-
:meth:`~matplotlib.backend_bases.GraphicsContextBase.set_foreground` (and
193-
the other GraphicsContext classes that descend from it) has been renamed to
194-
``isRGBA``, and should now only be set to ``True`` if the ``fg`` color
195-
argument is known to be an RGBA tuple.
203+
* On Linux, the user-specific `matplotlibrc` configuration file is now
204+
located in `~/.config/matplotlib/matplotlibrc` to conform to the
205+
`XDG Base Directory Specification
206+
<http://standards.freedesktop.org/basedir-spec/basedir-spec-latest.html>`_.
196207

197-
* For :class:`~matplotlib.patches.Patch`, the ``capstyle`` used is now
198-
``butt``, to be consistent with the default for most other objects, and to
199-
avoid problems with non-solid ``linestyle`` appearing solid when using a
200-
large ``linewidth``. Previously, :class:`~matplotlib.patches.Patch` used
201-
``capstyle='projecting'``.
208+
* The `font.*` rcParams now affect only text objects created after the
209+
rcParam has been set, and will not retroactively affect already
210+
existing text objects. This brings their behavior in line with most
211+
other rcParams.
212+
213+
* Removed call of :meth:`~matplotlib.axes.Axes.grid` in
214+
:meth:`~matplotlib.pyplot.plotfile`. To draw the axes grid, set the
215+
``axes.grid`` rcParam to *True*, or explicitly call
216+
:meth:`~matplotlib.axes.Axes.grid`.
202217

203218
Changes in 1.2.x
204219
================

0 commit comments

Comments
 (0)