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

Skip to content

Commit fece8e8

Browse files
QuLogicImportanceOfBeingErnest
authored andcommitted
Fix cross-references in API changes < 3.0.0. (#15080)
1 parent 70db457 commit fece8e8

File tree

6 files changed

+101
-271
lines changed

6 files changed

+101
-271
lines changed

doc/api/prev_api_changes/api_changes_2.0.0.rst

Lines changed: 23 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,13 @@ GTK and GDK backends deprecated
1515
The GDK and GTK backends have been deprecated. These obsolete backends
1616
allow figures to be rendered via the GDK API to files and GTK2 figures.
1717
They are untested and known to be broken, and their use has been
18-
discouraged for some time. Instead, use the `GTKAgg` and `GTKCairo`
18+
discouraged for some time. Instead, use the ``GTKAgg`` and ``GTKCairo``
1919
backends for rendering to GTK2 windows.
2020

2121
WX backend deprecated
2222
~~~~~~~~~~~~~~~~~~~~~
2323
The WX backend has been deprecated. It is untested, and its
24-
use has been discouraged for some time. Instead, use the `WXAgg`
24+
use has been discouraged for some time. Instead, use the ``WXAgg``
2525
backend for rendering figures to WX windows.
2626

2727
CocoaAgg backend removed
@@ -39,36 +39,35 @@ was unused internally and has been removed. Instead, use either the
3939
'hold' functionality deprecated
4040
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
4141
The 'hold' keyword argument and all functions and methods related
42-
to it are deprecated, along with the 'axes.hold' `rcParams` entry.
42+
to it are deprecated, along with the ``axes.hold`` rcParams entry.
4343
The behavior will remain consistent with the default ``hold=True``
4444
state that has long been in place. Instead of using a function
4545
or keyword argument (``hold=False``) to change that behavior,
4646
explicitly clear the axes or figure as needed prior to subsequent
4747
plotting commands.
4848

4949

50-
`Artist.update` has return value
51-
--------------------------------
50+
`.Artist.update` has return value
51+
---------------------------------
5252

53-
The methods `matplotlib.artist.Artist.set`,
54-
`matplotlib.Artist.update`, and the function `matplotlib.artist.setp`
55-
now use a common codepath to look up how to update the given artist
56-
properties (either using the setter methods or an attribute/property).
53+
The methods `matplotlib.artist.Artist.set`, `matplotlib.artist.Artist.update`,
54+
and the function `matplotlib.artist.setp` now use a common codepath to look up
55+
how to update the given artist properties (either using the setter methods or
56+
an attribute/property).
5757

58-
The behavior of `matplotlib.Artist.update` is slightly changed to
59-
return a list of the values returned from the setter methods to avoid
60-
changing the API of `matplotlib.Artist.set` and
61-
`matplotlib.artist.setp`.
58+
The behavior of `matplotlib.artist.Artist.update` is slightly changed to return
59+
a list of the values returned from the setter methods to avoid changing the API
60+
of `matplotlib.artist.Artist.set` and `matplotlib.artist.setp`.
6261

63-
The keys passed into `matplotlib.Artist.update` are now converted to
62+
The keys passed into `matplotlib.artist.Artist.update` are now converted to
6463
lower case before being processed, to match the behavior of
65-
`matplotlib.Artist.set` and `matplotlib.artist.setp`. This should not
64+
`matplotlib.artist.Artist.set` and `matplotlib.artist.setp`. This should not
6665
break any user code because there are no set methods with capitals in
6766
their names, but this puts a constraint on naming properties in the future.
6867

6968

70-
`Legend` initializers gain edgecolor and facecolor kwargs
71-
---------------------------------------------------------
69+
`.Legend` initializers gain *edgecolor* and *facecolor* keyword arguments
70+
-------------------------------------------------------------------------
7271

7372
The :class:`~matplotlib.legend.Legend` background patch (or 'frame')
7473
can have its ``edgecolor`` and ``facecolor`` determined by the
@@ -85,7 +84,7 @@ Qualitative colormaps
8584

8685
Colorbrewer's qualitative/discrete colormaps ("Accent", "Dark2", "Paired",
8786
"Pastel1", "Pastel2", "Set1", "Set2", "Set3") are now implemented as
88-
``ListedColormap`` instead of ``LinearSegmentedColormap``.
87+
`.ListedColormap` instead of `.LinearSegmentedColormap`.
8988

9089
To use these for images where categories are specified as integers, for
9190
instance, use::
@@ -104,10 +103,10 @@ See the ``draw_image`` docstring for more information.
104103

105104

106105

107-
`matplotlib.ticker.LinearLocator` algorithm update
108-
--------------------------------------------------
106+
``matplotlib.ticker.LinearLocator`` algorithm update
107+
----------------------------------------------------
109108

110-
The ``matplotlib.ticker.LinearLocator`` is used to define the range and
109+
The `matplotlib.ticker.LinearLocator` is used to define the range and
111110
location of axis ticks when the user wants an exact number of ticks.
112111
``LinearLocator`` thus differs from the default locator ``MaxNLocator``,
113112
for which the user specifies a maximum number of intervals rather than
@@ -141,8 +140,8 @@ ticks between integer powers of the base. The algorithm uses
141140
two parameters supplied in a kwarg tuple named 'minor_thresholds'.
142141
See the docstring for further explanation.
143142

144-
To improve support for axes using `~matplotlib.ticker.SymmetricLogLocator`,
145-
a 'linthresh' kwarg was added.
143+
To improve support for axes using `~matplotlib.ticker.SymmetricalLogLocator`,
144+
a *linthresh* keyword argument was added.
146145

147146

148147
New defaults for 3D quiver function in mpl_toolkits.mplot3d.axes3d.py
@@ -197,7 +196,7 @@ Default install no longer includes test images
197196
To reduce the size of wheels and source installs, the tests and
198197
baseline images are no longer included by default.
199198

200-
To restore installing the tests and images, use a `setup.cfg` with ::
199+
To restore installing the tests and images, use a :file:`setup.cfg` with ::
201200

202201
[packages]
203202
tests = True

doc/api/prev_api_changes/api_changes_2.0.1.rst

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -24,22 +24,22 @@ required that third-party backends extend
2424
these changes easier.
2525

2626

27-
`afm.get_fontconfig_fonts` returns a list of paths and does not check for existence
28-
-----------------------------------------------------------------------------------
27+
``afm.get_fontconfig_fonts`` returns a list of paths and does not check for existence
28+
-------------------------------------------------------------------------------------
2929

30-
`afm.get_fontconfig_fonts` used to return a set of paths encoded as a
30+
``afm.get_fontconfig_fonts`` used to return a set of paths encoded as a
3131
``{key: 1, ...}`` dict, and checked for the existence of the paths. It now
3232
returns a list and dropped the existence check, as the same check is performed
33-
by the caller (`afm.findSystemFonts`) as well.
33+
by the caller (``afm.findSystemFonts``) as well.
3434

3535

36-
`bar` now returns rectangles of negative height or width if the corresponding input is negative
37-
-----------------------------------------------------------------------------------------------
36+
``bar`` now returns rectangles of negative height or width if the corresponding input is negative
37+
-------------------------------------------------------------------------------------------------
3838

39-
`plt.bar` used to normalize the coordinates of the rectangles that it created,
40-
to keep their height and width positives, even if the corresponding input was
41-
negative. This normalization has been removed to permit a simpler computation
42-
of the correct `sticky_edges` to use.
39+
`.pyplot.bar` used to normalize the coordinates of the rectangles that it
40+
created, to keep their height and width positives, even if the corresponding
41+
input was negative. This normalization has been removed to permit a simpler
42+
computation of the correct `.Artist.sticky_edges` to use.
4343

4444

4545
Do not clip line width when scaling dashes

doc/api/prev_api_changes/api_changes_2.1.0.rst

Lines changed: 22 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -50,10 +50,10 @@ A function which take and ``Exception`` as its only argument may also be passed
5050
Improved toggling of the axes grids
5151
-----------------------------------
5252

53-
The `g` key binding now switches the states of the `x` and `y` grids
53+
The ``g`` key binding now switches the states of the ``x`` and ``y`` grids
5454
independently (by cycling through all four on/off combinations).
5555

56-
The new `G` key binding switches the states of the minor grids.
56+
The new ``G`` key binding switches the states of the minor grids.
5757

5858
Both bindings are disabled if only a subset of the grid lines (in either
5959
direction) is visible, to avoid making irreversible changes to the figure.
@@ -62,7 +62,7 @@ direction) is visible, to avoid making irreversible changes to the figure.
6262
Ticklabels are turned off instead of being invisible
6363
----------------------------------------------------
6464

65-
Internally, the `Tick`'s :func:`~matplotlib.axis.Tick.label1On` attribute
65+
Internally, the `.Tick`'s ``~matplotlib.axis.Tick.label1On`` attribute
6666
is now used to hide tick labels instead of setting the visibility on the tick
6767
label objects.
6868
This improves overall performance and fixes some issues.
@@ -78,15 +78,15 @@ needs to be used, e.g.
7878
Removal of warning on empty legends
7979
-----------------------------------
8080

81-
``plt.legend`` used to issue a warning when no labeled artist could be
81+
`.pyplot.legend` used to issue a warning when no labeled artist could be
8282
found. This warning has been removed.
8383

8484

8585
More accurate legend autopositioning
8686
------------------------------------
8787

8888
Automatic positioning of legends now prefers using the area surrounded
89-
by a `Line2D` rather than placing the legend over the line itself.
89+
by a `.Line2D` rather than placing the legend over the line itself.
9090

9191

9292
Cleanup of stock sample data
@@ -100,8 +100,9 @@ the ``msft.csv`` that continues to be shipped in the sample data. If a NumPy
100100
binary file is acceptable, we suggest using one of the following two new files.
101101
The ``aapl.npy.gz`` and ``goog.npy`` files have been replaced by ``aapl.npz``
102102
and ``goog.npz``, wherein the first column's type has changed from
103-
`datetime.date` to `np.datetime64` for better portability across Python
104-
versions. Note that Matplotlib does not fully support `np.datetime64` as yet.
103+
`datetime.date` to `numpy.datetime64` for better portability across Python
104+
versions. Note that Matplotlib does not fully support `numpy.datetime64` as
105+
yet.
105106

106107

107108
Updated qhull to 2015.2
@@ -120,7 +121,7 @@ using Matplotlib, i.e. any use of `matplotlib.tri.Triangulation` that
120121
requests that a Delaunay triangulation is calculated, which includes
121122
`matplotlib.pyplot.tricontour`, `matplotlib.pyplot.tricontourf`,
122123
`matplotlib.pyplot.tripcolor`, `matplotlib.pyplot.triplot`,
123-
`matplotlib.mlab.griddata` and
124+
``matplotlib.mlab.griddata`` and
124125
`mpl_toolkits.mplot3d.axes3d.Axes3D.plot_trisurf`.
125126

126127

@@ -135,7 +136,7 @@ It's better maintained and more widely used (by pylint, jaraco, etc).
135136
``cbook.is_numlike`` only performs an instance check
136137
----------------------------------------------------
137138

138-
:func:`~matplotlib.cbook.is_numlike` now only checks that its argument
139+
``matplotlib.cbook.is_numlike`` now only checks that its argument
139140
is an instance of ``(numbers.Number, np.Number)``. In particular,
140141
this means that arrays are now not num-like.
141142

@@ -195,14 +196,14 @@ will be removed in 2.2
195196

196197

197198

198-
Correct scaling of :func:`magnitude_spectrum()`
199-
-----------------------------------------------
199+
Correct scaling of ``magnitude_spectrum()``
200+
-------------------------------------------
200201

201202
The functions :func:`matplotlib.mlab.magnitude_spectrum()` and :func:`matplotlib.pyplot.magnitude_spectrum()` implicitly assumed the sum
202203
of windowing function values to be one. In Matplotlib and Numpy the
203204
standard windowing functions are scaled to have maximum value of one,
204205
which usually results in a sum of the order of n/2 for a n-point
205-
signal. Thus the amplitude scaling :func:`magnitude_spectrum()` was
206+
signal. Thus the amplitude scaling ``magnitude_spectrum()`` was
206207
off by that amount when using standard windowing functions (`Bug 8417
207208
<https://github.com/matplotlib/matplotlib/issues/8417>`_ ). Now the
208209
behavior is consistent with :func:`matplotlib.pyplot.psd()` and
@@ -295,13 +296,13 @@ Third-party backends should also migrate to the ``*_dashes`` methods.
295296
``NavigationToolbar2.dynamic_update``
296297
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
297298

298-
Use :meth:`draw_idle` method on the ``Canvas`` instance instead.
299+
Use :meth:`.draw_idle` method on the ``Canvas`` instance instead.
299300

300301

301302
Testing
302303
~~~~~~~
303304

304-
`matplotlib.testing.noseclasses` is deprecated and will be removed in 2.3
305+
``matplotlib.testing.noseclasses`` is deprecated and will be removed in 2.3
305306

306307

307308
``EngFormatter`` *num* arg as string
@@ -314,9 +315,9 @@ Passing a string as *num* argument when calling an instance of
314315
``mpl_toolkits.axes_grid`` module
315316
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
316317

317-
All functionally from `mpl_toolkits.axes_grid` can be found in either
318+
All functionally from ``mpl_toolkits.axes_grid`` can be found in either
318319
`mpl_toolkits.axes_grid1` or `mpl_toolkits.axisartist`. Axes classes
319-
from `mpl_toolkits.axes_grid` based on `Axis` from
320+
from ``mpl_toolkits.axes_grid`` based on ``Axis`` from
320321
`mpl_toolkits.axisartist` can be found in `mpl_toolkits.axisartist`.
321322

322323

@@ -402,9 +403,9 @@ The deprecated ``matplotlib.rcsetup.validate_maskedarray``,
402403
removed.
403404

404405

405-
The kwarg ``resolution`` of
406+
The keyword argument *resolution* of
406407
:class:`matplotlib.projections.polar.PolarAxes` has been removed. It
407-
has deprecation with no effect from version `0.98.x`.
408+
has deprecation with no effect from version *0.98.x*.
408409

409410

410411
``Axes.set_aspect("normal")``
@@ -421,8 +422,8 @@ The ``shading`` kwarg to `~matplotlib.axes.Axes.pcolor` has been
421422
removed. Set ``edgecolors`` appropriately instead.
422423

423424

424-
Functions removed from the `lines` module
425-
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
425+
Functions removed from the `.lines` module
426+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
426427

427428
The :mod:`matplotlib.lines` module no longer imports the
428429
``pts_to_prestep``, ``pts_to_midstep`` and ``pts_to_poststep``
@@ -433,7 +434,7 @@ PDF backend functions
433434
~~~~~~~~~~~~~~~~~~~~~
434435

435436
The methods ``embedTeXFont`` and ``tex_font_mapping`` of
436-
:class:`matplotlib.backqend_pdf.PdfFile` have been removed. It is
437+
:class:`matplotlib.backends.backend_pdf.PdfFile` have been removed. It is
437438
unlikely that external users would have called these methods, which
438439
are related to the font system internal to the PDF backend.
439440

doc/api/prev_api_changes/api_changes_2.1.2.rst

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,19 +2,19 @@
22
API Changes in 2.1.2
33
====================
44

5-
`Figure.legend` no longer checks for repeated lines to ignore
6-
-------------------------------------------------------------
5+
`.Figure.legend` no longer checks for repeated lines to ignore
6+
--------------------------------------------------------------
77

8-
`matplotlib.Figure.legend` used to check if a line had the
8+
`matplotlib.figure.Figure.legend` used to check if a line had the
99
same label as an existing legend entry. If it also had the same line color
1010
or marker color legend didn't add a new entry for that line. However, the
1111
list of conditions was incomplete, didn't handle RGB tuples,
1212
didn't handle linewidths or linestyles etc.
1313

14-
This logic did not exist in `Axes.legend`. It was included (erroneously)
14+
This logic did not exist in `.axes.Axes.legend`. It was included (erroneously)
1515
in Matplotlib 2.1.1 when the legend argument parsing was unified
1616
[#9324](https://github.com/matplotlib/matplotlib/pull/9324). This change
17-
removes that check in `Axes.legend` again to restore the old behavior.
17+
removes that check in `.axes.Axes.legend` again to restore the old behavior.
1818

1919
This logic has also been dropped from `.Figure.legend`, where it
2020
was previously undocumented. Repeated

0 commit comments

Comments
 (0)