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

Skip to content

Commit 18ded48

Browse files
committed
Fix cross-references in API changes < 2.0.0.
1 parent a37c20a commit 18ded48

6 files changed

+256
-823
lines changed

doc/api/prev_api_changes/api_changes_1.2.x.rst

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -4,16 +4,16 @@ Changes in 1.2.x
44
* The ``classic`` option of the rc parameter ``toolbar`` is deprecated
55
and will be removed in the next release.
66

7-
* The :meth:`~matplotlib.cbook.isvector` method has been removed since it
7+
* The ``matplotlib.cbook.isvector`` method has been removed since it
88
is no longer functional.
99

10-
* The `rasterization_zorder` property on `~matplotlib.axes.Axes` a
10+
* The ``rasterization_zorder`` property on `~matplotlib.axes.Axes` sets a
1111
zorder below which artists are rasterized. This has defaulted to
12-
-30000.0, but it now defaults to `None`, meaning no artists will be
12+
-30000.0, but it now defaults to *None*, meaning no artists will be
1313
rasterized. In order to rasterize artists below a given zorder
14-
value, `set_rasterization_zorder` must be explicitly called.
14+
value, `.set_rasterization_zorder` must be explicitly called.
1515

16-
* In :meth:`~matplotlib.axes.Axes.scatter`, and `~pyplot.scatter`,
16+
* In :meth:`~matplotlib.axes.Axes.scatter`, and `~.pyplot.scatter`,
1717
when specifying a marker using a tuple, the angle is now specified
1818
in degrees, not radians.
1919

@@ -35,11 +35,11 @@ Changes in 1.2.x
3535
``savefig.extension``, and sets the default file format used by
3636
:meth:`matplotlib.figure.Figure.savefig`.
3737

38-
* In :meth:`~matplotlib.pyplot.pie` and :meth:`~matplotlib.Axes.pie`, one can
39-
now set the radius of the pie; setting the *radius* to 'None' (the default
40-
value), will result in a pie with a radius of 1 as before.
38+
* In :func:`.pyplot.pie` and :meth:`.axes.Axes.pie`, one can now set the radius
39+
of the pie; setting the *radius* to 'None' (the default value), will result
40+
in a pie with a radius of 1 as before.
4141

42-
* Use of :func:`~matplotlib.projections.projection_factory` is now deprecated
42+
* Use of ``matplotlib.projections.projection_factory`` is now deprecated
4343
in favour of axes class identification using
4444
:func:`~matplotlib.projections.process_projection_requirements` followed by
4545
direct axes class invocation (at the time of writing, functions which do this
@@ -137,7 +137,7 @@ Changes in 1.2.x
137137
and py2.7. It is anticipated that the Qt3 support will be completely
138138
removed for the next release.
139139

140-
* :class:`~matplotlib.colors.ColorConverter`,
140+
* ``matplotlib.colors.ColorConverter``,
141141
:class:`~matplotlib.colors.Colormap` and
142142
:class:`~matplotlib.colors.Normalize` now subclasses ``object``
143143

doc/api/prev_api_changes/api_changes_1.3.x.rst

Lines changed: 59 additions & 58 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ Changes in 1.3.1
1010
It is rare that we make an API change in a bugfix release, however,
1111
for 1.3.1 since 1.3.0 the following change was made:
1212

13-
- `text.Text.cached` (used to cache font objects) has been made into a
13+
- ``text.Text.cached`` (used to cache font objects) has been made into a
1414
private variable. Among the obvious encapsulation benefit, this
1515
removes this confusing-looking member from the documentation.
1616

@@ -24,49 +24,52 @@ Code removal
2424
* The following items that were deprecated in version 1.2 or earlier
2525
have now been removed completely.
2626

27-
- The Qt 3.x backends (`qt` and `qtagg`) have been removed in
28-
favor of the Qt 4.x backends (`qt4` and `qt4agg`).
27+
- The Qt 3.x backends (``qt`` and ``qtagg``) have been removed in
28+
favor of the Qt 4.x backends (``qt4`` and ``qt4agg``).
2929

3030
- The FltkAgg and Emf backends have been removed.
3131

32-
- The `matplotlib.nxutils` module has been removed. Use the
32+
- The ``matplotlib.nxutils`` module has been removed. Use the
3333
functionality on `matplotlib.path.Path.contains_point` and
3434
friends instead.
3535

36-
- Instead of `axes.Axes.get_frame`, use `axes.Axes.patch`.
36+
- Instead of ``axes.Axes.get_frame``, use `.axes.Axes.patch`.
3737

38-
- The following `kwargs` to the `legend` function have been
39-
renamed:
38+
- The following keyword arguments to the `~.axes.Axes.legend` function have
39+
been renamed:
4040

41-
- `pad` -> `borderpad`
42-
- `labelsep` -> `labelspacing`
43-
- `handlelen` -> `handlelength`
44-
- `handletextsep` -> `handletextpad`
45-
- `axespad` -> `borderaxespad`
41+
- *pad* -> *borderpad*
42+
- *labelsep* -> *labelspacing*
43+
- *handlelen* -> *handlelength*
44+
- *handletextsep* -> *handletextpad*
45+
- *axespad* -> *borderaxespad*
4646

4747
Related to this, the following rcParams have been removed:
4848

49-
- `legend.pad`, `legend.labelsep`, `legend.handlelen`,
50-
`legend.handletextsep` and `legend.axespad`
49+
- ``legend.pad``,
50+
- ``legend.labelsep``,
51+
- ``legend.handlelen``,
52+
- ``legend.handletextsep`` and
53+
- ``legend.axespad``
5154

52-
- For the `hist` function, instead of `width`, use `rwidth`
55+
- For the `~.axes.Axes.hist` function, instead of *width*, use *rwidth*
5356
(relative width).
5457

55-
- On `patches.Circle`, the `resolution` kwarg has been removed.
58+
- On `.patches.Circle`, the *resolution* keyword argument has been removed.
5659
For a circle made up of line segments, use
57-
`patches.CirclePolygon`.
60+
`.patches.CirclePolygon`.
5861

5962
- The printing functions in the Wx backend have been removed due
6063
to the burden of keeping them up-to-date.
6164

62-
- `mlab.liaupunov` has been removed.
65+
- ``mlab.liaupunov`` has been removed.
6366

64-
- `mlab.save`, `mlab.load`, `pylab.save` and `pylab.load` have
67+
- ``mlab.save``, ``mlab.load``, ``pylab.save`` and ``pylab.load`` have
6568
been removed. We recommend using `numpy.savetxt` and
6669
`numpy.loadtxt` instead.
6770

68-
- `widgets.HorizontalSpanSelector` has been removed. Use
69-
`widgets.SpanSelector` instead.
71+
- ``widgets.HorizontalSpanSelector`` has been removed. Use
72+
`.widgets.SpanSelector` instead.
7073

7174
Code deprecation
7275
----------------
@@ -76,35 +79,33 @@ Code deprecation
7679

7780
* The top-level functions in `matplotlib.path` that are implemented in
7881
C++ were never meant to be public. Instead, users should use the
79-
Pythonic wrappers for them in the `path.Path` and
80-
`collections.Collection` classes. Use the following mapping to update
82+
Pythonic wrappers for them in the `.path.Path` and
83+
`.collections.Collection` classes. Use the following mapping to update
8184
your code:
8285

83-
- `point_in_path` -> `path.Path.contains_point`
84-
- `get_path_extents` -> `path.Path.get_extents`
85-
- `point_in_path_collection` -> `collection.Collection.contains`
86-
- `path_in_path` -> `path.Path.contains_path`
87-
- `path_intersects_path` -> `path.Path.intersects_path`
88-
- `convert_path_to_polygons` -> `path.Path.to_polygons`
89-
- `cleanup_path` -> `path.Path.cleaned`
90-
- `points_in_path` -> `path.Path.contains_points`
91-
- `clip_path_to_rect` -> `path.Path.clip_to_bbox`
92-
93-
* `matplotlib.colors.normalize` and `matplotlib.colors.no_norm` have
86+
- ``point_in_path`` -> `.path.Path.contains_point`
87+
- ``get_path_extents`` -> `.path.Path.get_extents`
88+
- ``point_in_path_collection`` -> `.collections.Collection.contains`
89+
- ``path_in_path`` -> `.path.Path.contains_path`
90+
- ``path_intersects_path`` -> `.path.Path.intersects_path`
91+
- ``convert_path_to_polygons`` -> `.path.Path.to_polygons`
92+
- ``cleanup_path`` -> `.path.Path.cleaned`
93+
- ``points_in_path`` -> `.path.Path.contains_points`
94+
- ``clip_path_to_rect`` -> `.path.Path.clip_to_bbox`
95+
96+
* ``matplotlib.colors.normalize`` and ``matplotlib.colors.no_norm`` have
9497
been deprecated in favour of `matplotlib.colors.Normalize` and
9598
`matplotlib.colors.NoNorm` respectively.
9699

97-
* The `ScalarMappable` class' `set_colorbar` is now
98-
deprecated. Instead, the
99-
:attr:`matplotlib.cm.ScalarMappable.colorbar` attribute should be
100-
used. In previous Matplotlib versions this attribute was an
101-
undocumented tuple of ``(colorbar_instance, colorbar_axes)`` but is
102-
now just ``colorbar_instance``. To get the colorbar axes it is
103-
possible to just use the
104-
:attr:`~matplotlib.colorbar.ColorbarBase.ax` attribute on a colorbar
100+
* The `.ScalarMappable` class' ``set_colorbar`` method is now deprecated.
101+
Instead, the :attr:`matplotlib.cm.ScalarMappable.colorbar` attribute should
102+
be used. In previous Matplotlib versions this attribute was an undocumented
103+
tuple of ``(colorbar_instance, colorbar_axes)`` but is now just
104+
``colorbar_instance``. To get the colorbar axes it is possible to just use
105+
the :attr:`~matplotlib.colorbar.ColorbarBase.ax` attribute on a colorbar
105106
instance.
106107

107-
* The `~matplotlib.mpl` module is now deprecated. Those who relied on this
108+
* The ``matplotlib.mpl`` module is now deprecated. Those who relied on this
108109
module should transition to simply using ``import matplotlib as mpl``.
109110

110111
Code changes
@@ -131,9 +132,9 @@ Code changes
131132
large ``linewidth``. Previously, :class:`~matplotlib.patches.Patch` used
132133
``capstyle='projecting'``.
133134

134-
* `Path` objects can now be marked as `readonly` by passing
135-
`readonly=True` to its constructor. The built-in path singletons,
136-
obtained through `Path.unit*` class methods return readonly paths.
135+
* `.Path` objects can now be marked as *readonly* by passing
136+
``readonly=True`` to its constructor. The built-in path singletons,
137+
obtained through ``Path.unit*`` class methods return readonly paths.
137138
If you have code that modified these, you will need to make a
138139
deepcopy first, using either::
139140

@@ -144,23 +145,23 @@ Code changes
144145

145146
path = Path.unit_circle().deepcopy()
146147

147-
Deep copying a `Path` always creates an editable (i.e. non-readonly)
148-
`Path`.
148+
Deep copying a `.Path` always creates an editable (i.e. non-readonly)
149+
`.Path`.
149150

150151
* The list at ``Path.NUM_VERTICES`` was replaced by a dictionary mapping
151152
Path codes to the number of expected vertices at
152153
:attr:`~matplotlib.path.Path.NUM_VERTICES_FOR_CODE`.
153154

154-
* To support XKCD style plots, the :func:`matplotlib.path.cleanup_path`
155+
* To support XKCD style plots, the ``matplotlib.path.cleanup_path``
155156
method's signature was updated to require a sketch argument. Users of
156-
:func:`matplotlib.path.cleanup_path` are encouraged to use the new
157+
``matplotlib.path.cleanup_path`` are encouraged to use the new
157158
:meth:`~matplotlib.path.Path.cleaned` Path method.
158159

159160
* Data limits on a plot now start from a state of having "null"
160161
limits, rather than limits in the range (0, 1). This has an effect
161162
on artists that only control limits in one direction, such as
162-
`axvline` and `axhline`, since their limits will not longer also
163-
include the range (0, 1). This fixes some problems where the
163+
`.axes.Axes.axvline` and `.axes.Axes.axhline`, since their limits will no
164+
longer also include the range (0, 1). This fixes some problems where the
164165
computed limits would be dependent on the order in which artists
165166
were added to the axes.
166167

@@ -174,7 +175,7 @@ Code changes
174175
width``.
175176

176177
* It is now possible to provide ``number of levels + 1`` colors in the case of
177-
`extend='both'` for contourf (or just ``number of levels`` colors for an
178+
``extend='both'`` for contourf (or just ``number of levels`` colors for an
178179
extend value ``min`` or ``max``) such that the resulting colormap's
179180
``set_under`` and ``set_over`` are defined appropriately. Any other number
180181
of colors will continue to behave as before (if more colors are provided
@@ -195,18 +196,18 @@ Code changes
195196
raises :class:`NotImplementedError` instead of :class:`OSError` if the
196197
:command:`ps` command cannot be run.
197198

198-
* The :func:`matplotlib.cbook.check_output` function has been moved to
199-
:func:`matplotlib.compat.subprocess`.
199+
* The ``matplotlib.cbook.check_output`` function has been moved to
200+
``matplotlib.compat.subprocess``.
200201

201202
Configuration and rcParams
202203
--------------------------
203204

204-
* On Linux, the user-specific `matplotlibrc` configuration file is now
205-
located in `~/.config/matplotlib/matplotlibrc` to conform to the
205+
* On Linux, the user-specific :file:`matplotlibrc` configuration file is now
206+
located in :file:`~/.config/matplotlib/matplotlibrc` to conform to the
206207
`XDG Base Directory Specification
207208
<https://specifications.freedesktop.org/basedir-spec/basedir-spec-latest.html>`_.
208209

209-
* The `font.*` rcParams now affect only text objects created after the
210+
* The ``font.*`` rcParams now affect only text objects created after the
210211
rcParam has been set, and will not retroactively affect already
211212
existing text objects. This brings their behavior in line with most
212213
other rcParams.

0 commit comments

Comments
 (0)