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

Skip to content

Commit 4f77378

Browse files
authored
Merge pull request #16335 from anntzer/missingrefs
Fix some more missing references.
2 parents 5d660a4 + b6a6d79 commit 4f77378

File tree

9 files changed

+68
-90
lines changed

9 files changed

+68
-90
lines changed

doc/api/cbook_api.rst

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,8 @@
66
:members:
77
:undoc-members:
88
:show-inheritance:
9+
10+
.. automodule:: matplotlib.cbook.deprecation
11+
:members:
12+
:undoc-members:
13+
:show-inheritance:

doc/api/colors_api.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,5 +51,6 @@ Functions
5151
to_rgba
5252
to_rgba_array
5353
is_color_like
54+
same_color
5455
makeMappingArray
5556
get_named_colors_mapping

doc/api/prev_api_changes/api_changes_3.0.0.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -407,7 +407,7 @@ The following classes, methods, functions, and attributes are deprecated:
407407
in future versions. It is just an alias for
408408
:class:`matplotlib.cbook.deprecation.MatplotlibDeprecationWarning`.
409409
Please use the
410-
:class:`~matplotlib.cbook.MatplotlibDeprecationWarning` directly if
410+
``matplotlib.cbook.MatplotlibDeprecationWarning`` directly if
411411
neccessary.
412412
- The ``matplotlib.cbook.Bunch`` class has been deprecated. Instead, use
413413
`types.SimpleNamespace` from the standard library which provides the same

doc/devel/contributing.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -304,7 +304,7 @@ prevent unexpected breaking of code that uses Matplotlib.
304304
possible, the deprecation must never make a given piece of code do something
305305
different than it was before; at least an exception should be raised.
306306
- If possible, usage of an deprecated API should emit a
307-
`MatplotlibDeprecationWarning`. There are a number of helper tools for this:
307+
`.MatplotlibDeprecationWarning`. There are a number of helper tools for this:
308308

309309
- Use `.cbook.warn_deprecated()` for general deprecation warnings.
310310
- Use the decorator ``@cbook.deprecated`` to deprecate classes, functions,

doc/missing-references.json

Lines changed: 44 additions & 69 deletions
Original file line numberDiff line numberDiff line change
@@ -285,12 +285,6 @@
285285
"matplotlib.backends.backend_webagg_core.NavigationToolbar2WebAgg": [
286286
"lib/matplotlib/backends/backend_nbagg.py:docstring of matplotlib.backends.backend_nbagg.NavigationIPy:1"
287287
],
288-
"matplotlib.cbook.MatplotlibDeprecationWarning": [
289-
"doc/api/prev_api_changes/api_changes_3.0.0.rst:406"
290-
],
291-
"matplotlib.cbook.deprecation.MatplotlibDeprecationWarning": [
292-
"doc/api/prev_api_changes/api_changes_3.0.0.rst:406"
293-
],
294288
"matplotlib.cm.Wistia": [
295289
"doc/users/prev_whats_new/whats_new_1.4.rst:21"
296290
],
@@ -626,7 +620,7 @@
626620
"doc/api/prev_api_changes/api_changes_0.91.0.rst:34"
627621
],
628622
"matplotlib.pylab": [
629-
"doc/api/prev_api_changes/api_changes_3.1.0.rst:624",
623+
"doc/api/prev_api_changes/api_changes_3.1.0.rst:616",
630624
"doc/users/history.rst:63"
631625
],
632626
"matplotlib.tests.test_basic": [
@@ -666,12 +660,12 @@
666660
"lib/matplotlib/axes/_base.py:docstring of matplotlib.axes.Axes.update_datalim_bounds:2"
667661
],
668662
"Axes.fmt_xdata": [
669-
"doc/api/prev_api_changes/api_changes_3.1.0.rst:405",
670-
"doc/api/prev_api_changes/api_changes_3.1.0.rst:408"
663+
"doc/api/prev_api_changes/api_changes_3.1.0.rst:397",
664+
"doc/api/prev_api_changes/api_changes_3.1.0.rst:400"
671665
],
672666
"Axes.fmt_ydata": [
673-
"doc/api/prev_api_changes/api_changes_3.1.0.rst:405",
674-
"doc/api/prev_api_changes/api_changes_3.1.0.rst:408"
667+
"doc/api/prev_api_changes/api_changes_3.1.0.rst:397",
668+
"doc/api/prev_api_changes/api_changes_3.1.0.rst:400"
675669
],
676670
"Axes.transData": [
677671
"doc/api/prev_api_changes/api_changes_3.2.0/behavior.rst:89",
@@ -684,14 +678,14 @@
684678
"lib/matplotlib/axes/_base.py:docstring of matplotlib.axes.Axes.add_child_axes:2"
685679
],
686680
"Axis._update_ticks": [
687-
"doc/api/prev_api_changes/api_changes_3.1.0.rst:1074"
681+
"doc/api/prev_api_changes/api_changes_3.1.0.rst:1066"
688682
],
689683
"Axis.get_inverted": [
690684
"doc/users/prev_whats_new/whats_new_3.1.0.rst:241",
691685
"doc/users/prev_whats_new/whats_new_3.1.0.rst:243"
692686
],
693687
"Axis.remove_overlaping_locs": [
694-
"doc/api/prev_api_changes/api_changes_3.1.0.rst:79"
688+
"doc/api/prev_api_changes/api_changes_3.1.0.rst:71"
695689
],
696690
"Axis.set_inverted": [
697691
"doc/users/prev_whats_new/whats_new_3.1.0.rst:241",
@@ -732,8 +726,8 @@
732726
"doc/devel/MEP/MEP23.rst:87"
733727
],
734728
"Formatter.__call__": [
735-
"doc/api/prev_api_changes/api_changes_3.1.0.rst:1123",
736-
"doc/api/prev_api_changes/api_changes_3.1.0.rst:1129"
729+
"doc/api/prev_api_changes/api_changes_3.1.0.rst:1115",
730+
"doc/api/prev_api_changes/api_changes_3.1.0.rst:1121"
737731
],
738732
"GaussianKDE": [
739733
"lib/matplotlib/axes/_axes.py:docstring of matplotlib.axes.Axes.violinplot:46",
@@ -752,17 +746,7 @@
752746
"lib/matplotlib/testing/decorators.py:docstring of matplotlib.testing.decorators.image_comparison:2"
753747
],
754748
"ImageComparisonTest": [
755-
"doc/api/prev_api_changes/api_changes_3.1.0.rst:710"
756-
],
757-
"Legend": [
758-
"doc/api/axes_api.rst:316:<autosummary>:1",
759-
"lib/matplotlib/axes/_base.py:docstring of matplotlib.axes.Axes.get_legend:2"
760-
],
761-
"LinearSegmentedColormaps": [
762-
"lib/matplotlib/colors.py:docstring of matplotlib.colors.makeMappingArray:64"
763-
],
764-
"MatplotlibDeprecationWarning": [
765-
"doc/devel/contributing.rst:306"
749+
"doc/api/prev_api_changes/api_changes_3.1.0.rst:702"
766750
],
767751
"MicrosecondLocator.__call__": [
768752
"doc/api/prev_api_changes/api_changes_1.5.0.rst:119"
@@ -789,7 +773,7 @@
789773
"doc/devel/MEP/MEP23.rst:93"
790774
],
791775
"NavigationToolbar2QT.adj_window": [
792-
"doc/api/prev_api_changes/api_changes_3.1.0.rst:969"
776+
"doc/api/prev_api_changes/api_changes_3.1.0.rst:961"
793777
],
794778
"PolyCollection.get_offset": [
795779
"lib/matplotlib/axes/_axes.py:docstring of matplotlib.axes.Axes.hexbin:71",
@@ -899,19 +883,19 @@
899883
"doc/users/prev_whats_new/whats_new_3.0.rst:111"
900884
],
901885
"axes3d.Axes3D.xaxis": [
902-
"doc/api/prev_api_changes/api_changes_3.1.0.rst:941"
886+
"doc/api/prev_api_changes/api_changes_3.1.0.rst:933"
903887
],
904888
"axes3d.Axes3D.yaxis": [
905-
"doc/api/prev_api_changes/api_changes_3.1.0.rst:941"
889+
"doc/api/prev_api_changes/api_changes_3.1.0.rst:933"
906890
],
907891
"axes3d.Axes3D.zaxis": [
908-
"doc/api/prev_api_changes/api_changes_3.1.0.rst:941"
892+
"doc/api/prev_api_changes/api_changes_3.1.0.rst:933"
909893
],
910894
"axes_grid1": [
911895
"doc/index.rst:184"
912896
],
913897
"axis.Axis.get_ticks_position": [
914-
"doc/api/prev_api_changes/api_changes_3.1.0.rst:829"
898+
"doc/api/prev_api_changes/api_changes_3.1.0.rst:821"
915899
],
916900
"axisartist": [
917901
"doc/index.rst:184"
@@ -920,44 +904,44 @@
920904
"lib/matplotlib/backends/backend_template.py:docstring of matplotlib.backends.backend_template.RendererTemplate:4"
921905
],
922906
"backend_bases.Timer.add_callback": [
923-
"doc/api/prev_api_changes/api_changes_3.1.0.rst:267"
907+
"doc/api/prev_api_changes/api_changes_3.1.0.rst:259"
924908
],
925909
"backend_bases.Timer.remove_callback": [
926-
"doc/api/prev_api_changes/api_changes_3.1.0.rst:247"
910+
"doc/api/prev_api_changes/api_changes_3.1.0.rst:239"
927911
],
928912
"backend_bases.ToolContainerBase": [
929913
"lib/matplotlib/backend_tools.py:docstring of matplotlib.backend_tools.add_tools_to_container:8"
930914
],
931915
"backend_gtk3.FileChooserDialog": [
932-
"doc/api/prev_api_changes/api_changes_3.1.0.rst:966"
916+
"doc/api/prev_api_changes/api_changes_3.1.0.rst:958"
933917
],
934918
"backend_gtk3.NavigationToolbar2GTK3.get_filechooser": [
935-
"doc/api/prev_api_changes/api_changes_3.1.0.rst:967"
919+
"doc/api/prev_api_changes/api_changes_3.1.0.rst:959"
936920
],
937921
"backend_gtk3.SaveFigureGTK3.get_filechooser": [
938-
"doc/api/prev_api_changes/api_changes_3.1.0.rst:968"
922+
"doc/api/prev_api_changes/api_changes_3.1.0.rst:960"
939923
],
940924
"backend_wx.IDLE_DELAY": [
941-
"doc/api/prev_api_changes/api_changes_3.1.0.rst:970"
925+
"doc/api/prev_api_changes/api_changes_3.1.0.rst:962"
942926
],
943927
"barstacked": [
944928
"doc/users/prev_whats_new/whats_new_1.2.rst:177"
945929
],
946930
"bezier.check_if_parallel": [
947-
"doc/api/prev_api_changes/api_changes_3.1.0.rst:801"
931+
"doc/api/prev_api_changes/api_changes_3.1.0.rst:793"
948932
],
949933
"bezier.find_bezier_t_intersecting_with_closedpath": [
950-
"doc/api/prev_api_changes/api_changes_3.1.0.rst:801"
934+
"doc/api/prev_api_changes/api_changes_3.1.0.rst:793"
951935
],
952936
"bezier.find_r_to_boundary_of_closedpath": [
953-
"doc/api/prev_api_changes/api_changes_3.1.0.rst:1026",
954-
"doc/api/prev_api_changes/api_changes_3.1.0.rst:801"
937+
"doc/api/prev_api_changes/api_changes_3.1.0.rst:1018",
938+
"doc/api/prev_api_changes/api_changes_3.1.0.rst:793"
955939
],
956940
"bezier.split_bezier_intersecting_with_closedpath": [
957-
"doc/api/prev_api_changes/api_changes_3.1.0.rst:801"
941+
"doc/api/prev_api_changes/api_changes_3.1.0.rst:793"
958942
],
959943
"bezier.split_path_inout": [
960-
"doc/api/prev_api_changes/api_changes_3.1.0.rst:801"
944+
"doc/api/prev_api_changes/api_changes_3.1.0.rst:793"
961945
],
962946
"blocking_input.BlockingInput.__call__": [
963947
"doc/api/prev_api_changes/api_changes_3.2.0/behavior.rst:293"
@@ -979,17 +963,17 @@
979963
"doc/devel/contributing.rst:521"
980964
],
981965
"cbook.deprecated": [
982-
"doc/api/prev_api_changes/api_changes_3.1.0.rst:1081",
983-
"doc/api/prev_api_changes/api_changes_3.1.0.rst:774"
966+
"doc/api/prev_api_changes/api_changes_3.1.0.rst:1073",
967+
"doc/api/prev_api_changes/api_changes_3.1.0.rst:766"
984968
],
985969
"cbook.warn_deprecated": [
986-
"doc/api/prev_api_changes/api_changes_3.1.0.rst:774"
970+
"doc/api/prev_api_changes/api_changes_3.1.0.rst:766"
987971
],
988972
"cbook.warn_deprecated()": [
989973
"doc/devel/contributing.rst:309"
990974
],
991975
"collections.LineCollection.get_segements()": [
992-
"doc/api/prev_api_changes/api_changes_3.1.0.rst:288"
976+
"doc/api/prev_api_changes/api_changes_3.1.0.rst:280"
993977
],
994978
"colorbar.ColorbarBase.outline": [
995979
"doc/api/prev_api_changes/api_changes_1.4.x.rst:83"
@@ -998,13 +982,10 @@
998982
"lib/matplotlib/testing/compare.py:docstring of matplotlib.testing.compare.compare_images:4"
999983
],
1000984
"dates.bytespdate2num": [
1001-
"doc/api/prev_api_changes/api_changes_3.1.0.rst:927"
985+
"doc/api/prev_api_changes/api_changes_3.1.0.rst:919"
1002986
],
1003987
"dates.strpdate2num": [
1004-
"doc/api/prev_api_changes/api_changes_3.1.0.rst:926"
1005-
],
1006-
"extend": [
1007-
"lib/matplotlib/colors.py:docstring of matplotlib.colors.from_levels_and_colors:13"
988+
"doc/api/prev_api_changes/api_changes_3.1.0.rst:918"
1008989
],
1009990
"fc-list": [
1010991
"lib/matplotlib/font_manager.py:docstring of matplotlib.font_manager.get_fontconfig_fonts:2"
@@ -1101,7 +1082,7 @@
11011082
"doc/users/prev_whats_new/whats_new_2.0.0.rst:123"
11021083
],
11031084
"legend.Legend.set_draggable()": [
1104-
"doc/api/prev_api_changes/api_changes_3.1.0.rst:507"
1085+
"doc/api/prev_api_changes/api_changes_3.1.0.rst:499"
11051086
],
11061087
"levels": [
11071088
"doc/api/prev_api_changes/api_changes_3.0.0.rst:197"
@@ -1446,16 +1427,13 @@
14461427
"doc/api/prev_api_changes/api_changes_1.5.0.rst:8"
14471428
],
14481429
"matplotlib.colorbar.ColorbarBase.set_clim": [
1449-
"doc/api/prev_api_changes/api_changes_3.1.0.rst:298"
1430+
"doc/api/prev_api_changes/api_changes_3.1.0.rst:290"
14501431
],
14511432
"matplotlib.colorbar.ColorbarBase.set_cmap": [
1452-
"doc/api/prev_api_changes/api_changes_3.1.0.rst:298"
1433+
"doc/api/prev_api_changes/api_changes_3.1.0.rst:290"
14531434
],
14541435
"matplotlib.colorbar.ColorbarBase.set_norm": [
1455-
"doc/api/prev_api_changes/api_changes_3.1.0.rst:298"
1456-
],
1457-
"matplotlib.colors.same_color": [
1458-
"doc/users/prev_whats_new/whats_new_2.2.rst:218"
1436+
"doc/api/prev_api_changes/api_changes_3.1.0.rst:290"
14591437
],
14601438
"matplotlib.contour.TriContourSet": [
14611439
"lib/matplotlib/pyplot.py:docstring of matplotlib.pyplot.tricontour:57",
@@ -1473,10 +1451,10 @@
14731451
"doc/devel/documenting_mpl.rst:671"
14741452
],
14751453
"matplotlib.pylab": [
1476-
"doc/api/prev_api_changes/api_changes_3.1.0.rst:626"
1454+
"doc/api/prev_api_changes/api_changes_3.1.0.rst:618"
14771455
],
14781456
"matplotlib.pyplot.get_scale_docs()": [
1479-
"doc/api/prev_api_changes/api_changes_3.1.0.rst:861"
1457+
"doc/api/prev_api_changes/api_changes_3.1.0.rst:853"
14801458
],
14811459
"matplotlib.sphinxext.mathmpl": [
14821460
"doc/users/prev_whats_new/whats_new_3.0.rst:225"
@@ -1492,10 +1470,10 @@
14921470
"lib/matplotlib/pyplot.py:docstring of matplotlib.pyplot.rcdefaults:4"
14931471
],
14941472
"matplotlib.testing.compare.calculate_rms": [
1495-
"doc/api/prev_api_changes/api_changes_3.1.0.rst:779"
1473+
"doc/api/prev_api_changes/api_changes_3.1.0.rst:771"
14961474
],
14971475
"matplotlib.testing.conftest.mpl_test_settings": [
1498-
"doc/api/prev_api_changes/api_changes_3.1.0.rst:949"
1476+
"doc/api/prev_api_changes/api_changes_3.1.0.rst:941"
14991477
],
15001478
"move_canvas": [
15011479
"doc/devel/MEP/MEP23.rst:65"
@@ -1577,8 +1555,8 @@
15771555
"lib/matplotlib/dates.py:docstring of matplotlib.dates:105"
15781556
],
15791557
"scipy.stats.norm.pdf": [
1580-
"doc/api/prev_api_changes/api_changes_3.1.0.rst:573",
1581-
"doc/api/prev_api_changes/api_changes_3.1.0.rst:659"
1558+
"doc/api/prev_api_changes/api_changes_3.1.0.rst:565",
1559+
"doc/api/prev_api_changes/api_changes_3.1.0.rst:651"
15821560
],
15831561
"self.codes": [
15841562
"lib/matplotlib/path.py:docstring of matplotlib.path.Path.codes:2"
@@ -1631,10 +1609,7 @@
16311609
"doc/devel/MEP/MEP10.rst:170"
16321610
],
16331611
"streamplot.Grid": [
1634-
"doc/api/prev_api_changes/api_changes_3.1.0.rst:487"
1635-
],
1636-
"strftime": [
1637-
"lib/matplotlib/dates.py:docstring of matplotlib.dates.ConciseDateFormatter:18"
1612+
"doc/api/prev_api_changes/api_changes_3.1.0.rst:479"
16381613
],
16391614
"style.available": [
16401615
"lib/matplotlib/style/__init__.py:docstring of matplotlib.style.context:12",

lib/matplotlib/axes/_base.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1756,7 +1756,7 @@ def axis(self, *args, emit=True, **kwargs):
17561756
return (*self.get_xlim(), *self.get_ylim())
17571757

17581758
def get_legend(self):
1759-
"""Return the `Legend` instance, or None if no legend is defined."""
1759+
"""Return the `.Legend` instance, or None if no legend is defined."""
17601760
return self.legend_
17611761

17621762
def get_images(self):

lib/matplotlib/cbook/deprecation.py

Lines changed: 10 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@ class MatplotlibDeprecationWarning(UserWarning):
1717
"""
1818

1919

20+
# mplDeprecation is deprecated. Use MatplotlibDeprecationWarning instead.
2021
mplDeprecation = MatplotlibDeprecationWarning
21-
"""mplDeprecation is deprecated. Use MatplotlibDeprecationWarning instead."""
2222

2323

2424
def _generate_deprecation_warning(
@@ -57,20 +57,18 @@ def warn_deprecated(
5757
since, *, message='', name='', alternative='', pending=False,
5858
obj_type='', addendum='', removal=''):
5959
"""
60-
Used to display deprecation in a standard way.
60+
Display a standardized deprecation.
6161
6262
Parameters
6363
----------
6464
since : str
6565
The release at which this API became deprecated.
6666
6767
message : str, optional
68-
Override the default deprecation message. The format
69-
specifier `%(name)s` may be used for the name of the function,
70-
and `%(alternative)s` may be used in the deprecation message
71-
to insert the name of an alternative to the deprecated
72-
function. `%(obj_type)s` may be used to insert a friendly name
73-
for the type of object being deprecated.
68+
Override the default deprecation message. The ``%(since)s``,
69+
``%(name)s``, ``%(alternative)s``, ``%(obj_type)s``, ``%(addendum)s``,
70+
and ``%(removal)s`` format specifiers will be replaced by the values
71+
of the respective arguments passed to this function.
7472
7573
name : str, optional
7674
The name of the deprecated object.
@@ -127,11 +125,10 @@ def deprecated(since, *, message='', name='', alternative='', pending=False,
127125
The release at which this API became deprecated.
128126
129127
message : str, optional
130-
Override the default deprecation message. The format
131-
specifier `%(name)s` may be used for the name of the object,
132-
and `%(alternative)s` may be used in the deprecation message
133-
to insert the name of an alternative to the deprecated
134-
object.
128+
Override the default deprecation message. The ``%(since)s``,
129+
``%(name)s``, ``%(alternative)s``, ``%(obj_type)s``, ``%(addendum)s``,
130+
and ``%(removal)s`` format specifiers will be replaced by the values
131+
of the respective arguments passed to this function.
135132
136133
name : str, optional
137134
The name used in the deprecation message; if not provided, the name

0 commit comments

Comments
 (0)