Skip to content

Commit 5a06283

Browse files
committed
Merge remote-tracking branch 'upstream/v1.3.x'
Conflicts: lib/matplotlib/__init__.py
2 parents af16f10 + 8a090dc commit 5a06283

File tree

661 files changed

+4790
-5100
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

661 files changed

+4790
-5100
lines changed

MANIFEST.in

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ include CHANGELOG INSTALL
22
include INTERACTIVE TODO CONTRIBUTING.md
33
include Makefile MANIFEST.in MANIFEST
44
include matplotlibrc.template setup.cfg.template
5-
include setupext.py setup.py setupegg.py
5+
include setupext.py setup.py setupegg.py distribute_setup.py
66
include lib/matplotlib/mpl-data/lineprops.glade
77
include lib/matplotlib/mpl-data/matplotlibrc
88
include lib/matplotlib/mpl-data/images/*

doc/api/api_changes.rst

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

20-
* On Linux, the user-specific `matplotlibrc` configuration file is now
21-
located in `~/.config/matplotlib/matplotlibrc` to conform to the
22-
`XDG Base Directory Specification
23-
<http://standards.freedesktop.org/basedir-spec/basedir-spec-latest.html>`_.
20+
Code removal
21+
------------
2422

2523
* The following items that were deprecated in version 1.2 or earlier
2624
have now been removed completely.
@@ -69,6 +67,9 @@ Changes in 1.3.x
6967
- `widgets.HorizontalSpanSelector` has been removed. Use
7068
`widgets.SpanSelector` instead.
7169

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

@@ -88,6 +89,47 @@ Changes in 1.3.x
8889
- `points_in_path` -> `path.Path.contains_points`
8990
- `clip_path_to_rect` -> `path.Path.clip_to_bbox`
9091

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+
91133
* `Path` objects can now be marked as `readonly` by passing
92134
`readonly=True` to its constructor. The built-in path singletons,
93135
obtained through `Path.unit*` class methods return readonly paths.
@@ -104,46 +146,33 @@ Changes in 1.3.x
104146
Deep copying a `Path` always creates an editable (i.e. non-readonly)
105147
`Path`.
106148

107-
* matplotlib.colors.normalize and matplotlib.colors.no_norm have been
108-
deprecated in favour of matplotlib.colors.Normalize and
109-
matplotlib.colors.NoNorm respectively.
110-
111-
* The `font.*` rcParams now affect only text objects created after the
112-
rcParam has been set, and will not retroactively affect already
113-
existing text objects. This brings their behavior in line with most
114-
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`.
115152

116153
* To support XKCD style plots, the :func:`matplotlib.path.cleanup_path`
117154
method's signature was updated to require a sketch argument. Users of
118155
:func:`matplotlib.path.cleanup_path` are encouraged to use the new
119156
:meth:`~matplotlib.path.Path.cleaned` Path method.
120157

121-
* The list at ``Path.NUM_VERTICES`` was replaced by a dictionary mapping
122-
Path codes to the number of expected vertices at
123-
: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.
124165

125166
* Fixed a bug in setting the position for the right/top spine with data
126167
position type. Previously, it would draw the right or top spine at
127168
+1 data offset.
128169

129-
* The ScalarMappable class' set_colorbar is now deprecated. Instead, the
130-
:attr:`matplotlib.cm.ScalarMappable.colorbar` attribute should be used.
131-
In previous matplotlib versions this attribute was an undocumented tuple
132-
of ``(colorbar_instance, colorbar_axes)`` but is now just
133-
``colorbar_instance``. To get the colorbar axes it is possible to just use
134-
the :attr:`~matplotlib.colorbar.ColorbarBase.ax` attribute on a colorbar
135-
isntance.
136-
137-
* In :class:`~matplotlib.patches.FancyArrow`, the default arrow head width,
138-
``head_width``, has been made larger to produce a visible arrow head. The new
139-
value of this kwarg is ``head_width = 20 * width``.
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``.
140174

141-
* Removed call of :meth:`~matplotlib.axes.Axes.grid` in
142-
:meth:`~matplotlib.pyplot.plotfile`. To draw the axes grid, set the
143-
``axes.grid`` rcParam to *True*, or explicitly call
144-
:meth:`~matplotlib.axes.Axes.grid`.
145-
146-
* 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
147176
`extend='both'` for contourf (or just ``number of levels`` colors for an
148177
extend value ``min`` or ``max``) such that the resulting colormap's
149178
``set_under`` and ``set_over`` are defined appropriately. Any other number
@@ -156,9 +185,6 @@ Changes in 1.3.x
156185
:class:`~matplotlib.colorbar.ColorbarBase` allows one to control the shape
157186
of colorbar extensions.
158187

159-
* The `~matplotlib.mpl` module is now deprecated. Those who relied on this
160-
module should transition to simply using ``import matplotlib as mpl``.
161-
162188
* The extension of :class:`~matplotlib.widgets.MultiCursor` to both vertical
163189
(default) and/or horizontal cursor implied that ``self.line`` is replaced
164190
by ``self.vline`` for vertical cursors lines and ``self.hline`` is added
@@ -171,26 +197,23 @@ Changes in 1.3.x
171197
* The :func:`matplotlib.cbook.check_output` function has been moved to
172198
:func:`matplotlib.compat.subprocess`.
173199

174-
* :class:`~matplotlib.patches.Patch` now fully supports using RGBA values for
175-
its ``facecolor`` and ``edgecolor`` attributes, which enables faces and
176-
edges to have different alpha values. If the
177-
:class:`~matplotlib.patches.Patch` object's ``alpha`` attribute is set to
178-
anything other than ``None``, that value will override any alpha-channel
179-
value in both the face and edge colors. Previously, if
180-
:class:`~matplotlib.patches.Patch` had ``alpha=None``, the alpha component
181-
of ``edgecolor`` would be applied to both the edge and face.
200+
Configuration and rcParams
201+
--------------------------
182202

183-
* The optional ``isRGB`` argument to
184-
:meth:`~matplotlib.backend_bases.GraphicsContextBase.set_foreground` (and
185-
the other GraphicsContext classes that descend from it) has been renamed to
186-
``isRGBA``, and should now only be set to ``True`` if the ``fg`` color
187-
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>`_.
188207

189-
* For :class:`~matplotlib.patches.Patch`, the ``capstyle`` used is now
190-
``butt``, to be consistent with the default for most other objects, and to
191-
avoid problems with non-solid ``linestyle`` appearing solid when using a
192-
large ``linewidth``. Previously, :class:`~matplotlib.patches.Patch` used
193-
``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`.
194217

195218
Changes in 1.2.x
196219
================

doc/conf.py

Lines changed: 19 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -220,11 +220,25 @@
220220
latex_logo = None
221221

222222
# Additional stuff for the LaTeX preamble.
223-
latex_preamble = """
224-
\\usepackage{amsmath}
225-
\\usepackage{amsfonts}
226-
\\usepackage{amssymb}
227-
\\usepackage{txfonts}
223+
latex_preamble =r"""
224+
% In the parameters section, place a newline after the Parameters
225+
% header. (This is stolen directly from Numpy's conf.py, since it
226+
% affects Numpy-style docstrings).
227+
\usepackage{expdlist}
228+
\let\latexdescription=\description
229+
\def\description{\latexdescription{}{} \breaklabel}
230+
231+
\usepackage{amsmath}
232+
\usepackage{amsfonts}
233+
\usepackage{amssymb}
234+
\usepackage{txfonts}
235+
236+
% The enumitem package provides unlimited nesting of lists and
237+
% enums. Sphinx may use this in the future, in which case this can
238+
% be removed. See
239+
% https://bitbucket.org/birkenfeld/sphinx/issue/777/latex-output-too-deeply-nested
240+
\usepackage{enumitem}
241+
\setlistdepth{2048}
228242
"""
229243

230244
# Documents to append as an appendix to all manuals.
@@ -254,5 +268,3 @@
254268

255269
################# numpydoc config ####################
256270
numpydoc_show_class_members = False
257-
258-

0 commit comments

Comments
 (0)