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

Skip to content

Commit 1dc568a

Browse files
committed
Get sphinx building without errors
Quiet sphinx warnings (by using matplotlib.axes.Axes instead of Axes already in the namespace)
1 parent 9418010 commit 1dc568a

File tree

5 files changed

+122
-35
lines changed

5 files changed

+122
-35
lines changed

doc/api/colors_api.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ Other classes
5252

5353
ColorSequenceRegistry
5454
LightSource
55+
Color
5556

5657
Functions
5758
---------

doc/api/lines_api.rst

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,9 @@ Classes
1717

1818
Line2D
1919
VertexSelector
20+
LineStyleType
21+
DrawStyleType
22+
MarkEveryType
2023

2124
Functions
2225
---------

doc/api/markers_api.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,3 +16,5 @@ Classes
1616
:template: autosummary.rst
1717

1818
MarkerStyle
19+
MarkerType
20+
FillStyleType

doc/missing-references.json

Lines changed: 106 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -97,10 +97,78 @@
9797
]
9898
},
9999
"py:class": {
100+
"ArrayLike": [
101+
"lib/matplotlib/pyplot.py:docstring of matplotlib.pyplot.acorr:1",
102+
"lib/matplotlib/pyplot.py:docstring of matplotlib.pyplot.angle_spectrum:1",
103+
"lib/matplotlib/pyplot.py:docstring of matplotlib.pyplot.bar:1",
104+
"lib/matplotlib/pyplot.py:docstring of matplotlib.pyplot.bar_label:1",
105+
"lib/matplotlib/pyplot.py:docstring of matplotlib.pyplot.barh:1",
106+
"lib/matplotlib/pyplot.py:docstring of matplotlib.pyplot.boxplot:1",
107+
"lib/matplotlib/pyplot.py:docstring of matplotlib.pyplot.clabel:1",
108+
"lib/matplotlib/pyplot.py:docstring of matplotlib.pyplot.csd:1",
109+
"lib/matplotlib/pyplot.py:docstring of matplotlib.pyplot.errorbar:1",
110+
"lib/matplotlib/pyplot.py:docstring of matplotlib.pyplot.eventplot:1",
111+
"lib/matplotlib/pyplot.py:docstring of matplotlib.pyplot.figimage:1",
112+
"lib/matplotlib/pyplot.py:docstring of matplotlib.pyplot.fill_between:1",
113+
"lib/matplotlib/pyplot.py:docstring of matplotlib.pyplot.fill_betweenx:1",
114+
"lib/matplotlib/pyplot.py:docstring of matplotlib.pyplot.hist2d:1",
115+
"lib/matplotlib/pyplot.py:docstring of matplotlib.pyplot.hist:1",
116+
"lib/matplotlib/pyplot.py:docstring of matplotlib.pyplot.hlines:1",
117+
"lib/matplotlib/pyplot.py:docstring of matplotlib.pyplot.imsave:1",
118+
"lib/matplotlib/pyplot.py:docstring of matplotlib.pyplot.imshow:1",
119+
"lib/matplotlib/pyplot.py:docstring of matplotlib.pyplot.magnitude_spectrum:1",
120+
"lib/matplotlib/pyplot.py:docstring of matplotlib.pyplot.matshow:1",
121+
"lib/matplotlib/pyplot.py:docstring of matplotlib.pyplot.pcolor:1",
122+
"lib/matplotlib/pyplot.py:docstring of matplotlib.pyplot.pcolormesh:1",
123+
"lib/matplotlib/pyplot.py:docstring of matplotlib.pyplot.phase_spectrum:1",
124+
"lib/matplotlib/pyplot.py:docstring of matplotlib.pyplot.pie:1",
125+
"lib/matplotlib/pyplot.py:docstring of matplotlib.pyplot.plot:1",
126+
"lib/matplotlib/pyplot.py:docstring of matplotlib.pyplot.plot_date:1",
127+
"lib/matplotlib/pyplot.py:docstring of matplotlib.pyplot.psd:1",
128+
"lib/matplotlib/pyplot.py:docstring of matplotlib.pyplot.rgrids:1",
129+
"lib/matplotlib/pyplot.py:docstring of matplotlib.pyplot.scatter:1",
130+
"lib/matplotlib/pyplot.py:docstring of matplotlib.pyplot.specgram:1",
131+
"lib/matplotlib/pyplot.py:docstring of matplotlib.pyplot.spy:1",
132+
"lib/matplotlib/pyplot.py:docstring of matplotlib.pyplot.stairs:1",
133+
"lib/matplotlib/pyplot.py:docstring of matplotlib.pyplot.step:1",
134+
"lib/matplotlib/pyplot.py:docstring of matplotlib.pyplot.subplot_mosaic:1",
135+
"lib/matplotlib/pyplot.py:docstring of matplotlib.pyplot.thetagrids:1",
136+
"lib/matplotlib/pyplot.py:docstring of matplotlib.pyplot.violinplot:1",
137+
"lib/matplotlib/pyplot.py:docstring of matplotlib.pyplot.vlines:1"
138+
],
139+
"Axes": [
140+
"lib/matplotlib/pyplot.py:docstring of matplotlib.pyplot.colorbar:1",
141+
"lib/matplotlib/pyplot.py:docstring of matplotlib.pyplot.subplot_mosaic:1",
142+
"lib/matplotlib/pyplot.py:docstring of matplotlib.pyplot.subplots:1",
143+
"lib/matplotlib/pyplot.py:docstring of matplotlib.pyplot.twinx:1",
144+
"lib/matplotlib/pyplot.py:docstring of matplotlib.pyplot.twiny:1"
145+
],
146+
"Color": [
147+
"lib/matplotlib/pyplot.py:docstring of matplotlib.pyplot.errorbar:1",
148+
"lib/matplotlib/pyplot.py:docstring of matplotlib.pyplot.eventplot:1",
149+
"lib/matplotlib/pyplot.py:docstring of matplotlib.pyplot.hist:1",
150+
"lib/matplotlib/pyplot.py:docstring of matplotlib.pyplot.hlines:1",
151+
"lib/matplotlib/pyplot.py:docstring of matplotlib.pyplot.pie:1",
152+
"lib/matplotlib/pyplot.py:docstring of matplotlib.pyplot.scatter:1",
153+
"lib/matplotlib/pyplot.py:docstring of matplotlib.pyplot.vlines:1"
154+
],
155+
"LineStyleType": [
156+
"lib/matplotlib/pyplot.py:docstring of matplotlib.pyplot.eventplot:1",
157+
"lib/matplotlib/pyplot.py:docstring of matplotlib.pyplot.hlines:1",
158+
"lib/matplotlib/pyplot.py:docstring of matplotlib.pyplot.vlines:1"
159+
],
160+
"MarkerType": [
161+
"lib/matplotlib/pyplot.py:docstring of matplotlib.pyplot.scatter:1"
162+
],
163+
"SubplotBase": [
164+
"lib/matplotlib/pyplot.py:docstring of matplotlib.pyplot.subplots:1"
165+
],
166+
"_AxesBase": [
167+
"lib/matplotlib/pyplot.py:docstring of matplotlib.pyplot.twinx:1",
168+
"lib/matplotlib/pyplot.py:docstring of matplotlib.pyplot.twiny:1"
169+
],
100170
"matplotlib.axes._base._AxesBase": [
101-
"doc/api/artist_api.rst:202",
102-
"doc/api/axes_api.rst:603",
103-
"lib/matplotlib/axes/_axes.py:docstring of matplotlib.axes._axes.Axes:1"
171+
"doc/api/artist_api.rst:202"
104172
],
105173
"matplotlib.backend_bases.FigureCanvas": [
106174
"doc/tutorials/intermediate/artists.rst:32",
@@ -210,6 +278,23 @@
210278
"doc/api/_as_gen/mpl_toolkits.axisartist.floating_axes.rst:32:<autosummary>:1",
211279
"lib/mpl_toolkits/axisartist/floating_axes.py:docstring of mpl_toolkits.axisartist.floating_axes.FloatingAxesHostAxes:1"
212280
],
281+
"np.ndarray": [
282+
"lib/matplotlib/pyplot.py:docstring of matplotlib.pyplot.acorr:1",
283+
"lib/matplotlib/pyplot.py:docstring of matplotlib.pyplot.angle_spectrum:1",
284+
"lib/matplotlib/pyplot.py:docstring of matplotlib.pyplot.cohere:1",
285+
"lib/matplotlib/pyplot.py:docstring of matplotlib.pyplot.csd:1",
286+
"lib/matplotlib/pyplot.py:docstring of matplotlib.pyplot.hist2d:1",
287+
"lib/matplotlib/pyplot.py:docstring of matplotlib.pyplot.hist:1",
288+
"lib/matplotlib/pyplot.py:docstring of matplotlib.pyplot.imread:1",
289+
"lib/matplotlib/pyplot.py:docstring of matplotlib.pyplot.magnitude_spectrum:1",
290+
"lib/matplotlib/pyplot.py:docstring of matplotlib.pyplot.phase_spectrum:1",
291+
"lib/matplotlib/pyplot.py:docstring of matplotlib.pyplot.psd:1",
292+
"lib/matplotlib/pyplot.py:docstring of matplotlib.pyplot.specgram:1",
293+
"lib/matplotlib/pyplot.py:docstring of matplotlib.pyplot.subplots:1",
294+
"lib/matplotlib/pyplot.py:docstring of matplotlib.pyplot.xcorr:1",
295+
"lib/matplotlib/pyplot.py:docstring of matplotlib.pyplot.xticks:1",
296+
"lib/matplotlib/pyplot.py:docstring of matplotlib.pyplot.yticks:1"
297+
],
213298
"numpy.uint8": [
214299
"lib/matplotlib/path.py:docstring of matplotlib.path:1"
215300
],
@@ -219,11 +304,11 @@
219304
},
220305
"py:data": {
221306
"matplotlib.axes.Axes.transAxes": [
222-
"lib/matplotlib/axes/_axes.py:docstring of matplotlib.axes._axes.Axes.legend:234",
223-
"lib/matplotlib/figure.py:docstring of matplotlib.figure.FigureBase.add_axes:2",
224-
"lib/matplotlib/legend.py:docstring of matplotlib.legend.Legend:91",
225-
"lib/matplotlib/pyplot.py:docstring of matplotlib.pyplot.figlegend:233",
226-
"lib/matplotlib/pyplot.py:docstring of matplotlib.pyplot.legend:234"
307+
"lib/matplotlib/axes/_axes.py:docstring of matplotlib.axes._axes.Axes.legend:240",
308+
"lib/matplotlib/figure.py:docstring of matplotlib.figure.FigureBase.add_axes:18",
309+
"lib/matplotlib/legend.py:docstring of matplotlib.legend.Legend:107",
310+
"lib/matplotlib/pyplot.py:docstring of matplotlib.pyplot.figlegend:249",
311+
"lib/matplotlib/pyplot.py:docstring of matplotlib.pyplot.legend:240"
227312
]
228313
},
229314
"py:meth": {
@@ -248,15 +333,15 @@
248333
],
249334
"matplotlib.collections._CollectionWithSizes.set_sizes": [
250335
"lib/matplotlib/axes/_axes.py:docstring of matplotlib.axes._axes.Axes.barbs:171",
251-
"lib/matplotlib/axes/_axes.py:docstring of matplotlib.axes._axes.Axes.broken_barh:81",
336+
"lib/matplotlib/axes/_axes.py:docstring of matplotlib.axes._axes.Axes.broken_barh:77",
252337
"lib/matplotlib/axes/_axes.py:docstring of matplotlib.axes._axes.Axes.fill_between:113",
253338
"lib/matplotlib/axes/_axes.py:docstring of matplotlib.axes._axes.Axes.fill_betweenx:113",
254339
"lib/matplotlib/axes/_axes.py:docstring of matplotlib.axes._axes.Axes.hexbin:201",
255340
"lib/matplotlib/axes/_axes.py:docstring of matplotlib.axes._axes.Axes.pcolor:173",
256341
"lib/matplotlib/axes/_axes.py:docstring of matplotlib.axes._axes.Axes.quiver:207",
257342
"lib/matplotlib/collections.py:docstring of matplotlib.collections.AsteriskPolygonCollection:22",
258343
"lib/matplotlib/pyplot.py:docstring of matplotlib.pyplot.barbs:171",
259-
"lib/matplotlib/pyplot.py:docstring of matplotlib.pyplot.broken_barh:81",
344+
"lib/matplotlib/pyplot.py:docstring of matplotlib.pyplot.broken_barh:77",
260345
"lib/matplotlib/pyplot.py:docstring of matplotlib.pyplot.fill_between:113",
261346
"lib/matplotlib/pyplot.py:docstring of matplotlib.pyplot.fill_betweenx:113",
262347
"lib/matplotlib/pyplot.py:docstring of matplotlib.pyplot.hexbin:201",
@@ -275,15 +360,15 @@
275360
"doc/users/explain/interactive_guide.rst:323"
276361
],
277362
"Artist.sticky_edges": [
278-
"doc/api/axes_api.rst:352:<autosummary>:1",
363+
"doc/api/axes_api.rst:353:<autosummary>:1",
279364
"lib/matplotlib/axes/_axes.py:docstring of matplotlib.axes.Axes.use_sticky_edges:1"
280365
],
281366
"Axes.dataLim": [
282-
"doc/api/axes_api.rst:291:<autosummary>:1",
367+
"doc/api/axes_api.rst:292:<autosummary>:1",
283368
"lib/matplotlib/axes/_base.py:docstring of matplotlib.axes._base._AxesBase.update_datalim:1"
284369
],
285370
"AxesBase": [
286-
"doc/api/axes_api.rst:444:<autosummary>:1",
371+
"doc/api/axes_api.rst:445:<autosummary>:1",
287372
"lib/matplotlib/axes/_base.py:docstring of matplotlib.axes._base._AxesBase.add_child_axes:1"
288373
],
289374
"Figure.stale_callback": [
@@ -299,7 +384,7 @@
299384
"lib/matplotlib/testing/decorators.py:docstring of matplotlib.testing.decorators:1"
300385
],
301386
"Line2D.pick": [
302-
"doc/users/explain/event_handling.rst:468"
387+
"doc/users/explain/event_handling.rst:567"
303388
],
304389
"QuadContourSet.changed()": [
305390
"lib/matplotlib/axes/_axes.py:docstring of matplotlib.axes._axes.Axes.contour:147",
@@ -308,7 +393,7 @@
308393
"lib/matplotlib/pyplot.py:docstring of matplotlib.pyplot.contourf:147"
309394
],
310395
"Rectangle.contains": [
311-
"doc/users/explain/event_handling.rst:180"
396+
"doc/users/explain/event_handling.rst:279"
312397
],
313398
"Size.from_any": [
314399
"lib/mpl_toolkits/axes_grid1/axes_grid.py:docstring of mpl_toolkits.axes_grid1.axes_grid.ImageGrid:53",
@@ -348,18 +433,14 @@
348433
],
349434
"axes.bbox": [
350435
"lib/matplotlib/axes/_axes.py:docstring of matplotlib.axes._axes.Axes.legend:137",
351-
"lib/matplotlib/figure.py:docstring of matplotlib.figure.Figure:116",
352-
"lib/matplotlib/legend.py:docstring of matplotlib.legend.DraggableLegend.finalize_offset:20",
353-
"lib/matplotlib/pyplot.py:docstring of matplotlib.pyplot.figlegend:136",
436+
"lib/matplotlib/figure.py:docstring of matplotlib.figure.Figure:126",
437+
"lib/matplotlib/legend.py:docstring of matplotlib.legend.Legend:4",
438+
"lib/matplotlib/pyplot.py:docstring of matplotlib.pyplot.figlegend:146",
354439
"lib/matplotlib/pyplot.py:docstring of matplotlib.pyplot.legend:137"
355440
],
356441
"can_composite": [
357442
"lib/matplotlib/image.py:docstring of matplotlib.image:5"
358443
],
359-
"cleanup": [
360-
"lib/matplotlib/animation.py:docstring of matplotlib.animation.FileMovieWriter:13",
361-
"lib/matplotlib/animation.py:docstring of matplotlib.animation.HTMLWriter:13"
362-
],
363444
"converter": [
364445
"lib/matplotlib/testing/compare.py:docstring of matplotlib.testing.compare:1"
365446
],
@@ -368,9 +449,9 @@
368449
],
369450
"figure.bbox": [
370451
"lib/matplotlib/axes/_axes.py:docstring of matplotlib.axes._axes.Axes.legend:137",
371-
"lib/matplotlib/figure.py:docstring of matplotlib.figure.Figure:116",
372-
"lib/matplotlib/legend.py:docstring of matplotlib.legend.DraggableLegend.finalize_offset:20",
373-
"lib/matplotlib/pyplot.py:docstring of matplotlib.pyplot.figlegend:136",
452+
"lib/matplotlib/figure.py:docstring of matplotlib.figure.Figure:126",
453+
"lib/matplotlib/legend.py:docstring of matplotlib.legend.Legend:4",
454+
"lib/matplotlib/pyplot.py:docstring of matplotlib.pyplot.figlegend:146",
374455
"lib/matplotlib/pyplot.py:docstring of matplotlib.pyplot.legend:137"
375456
],
376457
"fmt_xdata": [

lib/matplotlib/pyplot.py

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1105,7 +1105,7 @@ def figlegend(*args, **kwargs) -> Legend:
11051105
def axes(
11061106
arg: None | tuple[float, float, float, float] = None,
11071107
**kwargs
1108-
) -> Axes:
1108+
) -> matplotlib.axes.Axes:
11091109
"""
11101110
Add an Axes to the current figure and make it the current Axes.
11111111
@@ -1191,7 +1191,7 @@ def axes(
11911191
return fig.add_axes(arg, **kwargs)
11921192

11931193

1194-
def delaxes(ax: Axes | None = None) -> None:
1194+
def delaxes(ax: matplotlib.axes.Axes | None = None) -> None:
11951195
"""
11961196
Remove an `~.axes.Axes` (defaulting to the current axes) from its figure.
11971197
"""
@@ -1217,7 +1217,7 @@ def cla() -> None:
12171217
## More ways of creating axes ##
12181218

12191219
@_docstring.dedent_interpd
1220-
def subplot(*args, **kwargs) -> Axes:
1220+
def subplot(*args, **kwargs) -> matplotlib.axes.Axes:
12211221
"""
12221222
Add an Axes to the current figure or retrieve an existing Axes.
12231223
@@ -1414,7 +1414,7 @@ def subplots(
14141414
subplot_kw: dict[str, Any] | None = None,
14151415
gridspec_kw: dict[str, Any] | None = None,
14161416
**fig_kw
1417-
) -> tuple[Figure, Axes | np.ndarray | SubplotBase]:
1417+
) -> tuple[Figure, matplotlib.axes.Axes | np.ndarray | SubplotBase]:
14181418
"""
14191419
Create a figure and a set of subplots.
14201420
@@ -1578,7 +1578,7 @@ def subplot_mosaic(
15781578
gridspec_kw: dict[str, Any] | None = None,
15791579
per_subplot_kw: dict[Any, dict[str, Any]] | None = None,
15801580
**fig_kw
1581-
) -> tuple[Figure, dict[Any, Axes]]:
1581+
) -> tuple[Figure, dict[Any, matplotlib.axes.Axes]]:
15821582
"""
15831583
Build a layout of Axes based on ASCII art or nested lists.
15841584
@@ -1695,7 +1695,7 @@ def subplot2grid(
16951695
rowspan: int = 1, colspan: int = 1,
16961696
fig: Figure | None = None,
16971697
**kwargs
1698-
) -> Axes:
1698+
) -> matplotlib.axes.Axes:
16991699
"""
17001700
Create a subplot at a specific location inside a regular grid.
17011701
@@ -1742,7 +1742,7 @@ def subplot2grid(
17421742
return fig.add_subplot(subplotspec, **kwargs)
17431743

17441744

1745-
def twinx(ax: Axes | None = None) -> _AxesBase:
1745+
def twinx(ax: matplotlib.axes.Axes | None = None) -> _AxesBase:
17461746
"""
17471747
Make and return a second axes that shares the *x*-axis. The new axes will
17481748
overlay *ax* (or the current axes if *ax* is *None*), and its ticks will be
@@ -1758,7 +1758,7 @@ def twinx(ax: Axes | None = None) -> _AxesBase:
17581758
return ax1
17591759

17601760

1761-
def twiny(ax: Axes | None = None) -> _AxesBase:
1761+
def twiny(ax: matplotlib.axes.Axes | None = None) -> _AxesBase:
17621762
"""
17631763
Make and return a second axes that shares the *y*-axis. The new axes will
17641764
overlay *ax* (or the current axes if *ax* is *None*), and its ticks will be
@@ -2213,8 +2213,8 @@ def _get_pyplot_commands() -> list[str]:
22132213
@_copy_docstring_and_deprecators(Figure.colorbar)
22142214
def colorbar(
22152215
mappable: ScalarMappable | None = None,
2216-
cax: Axes | None = None,
2217-
ax: Axes | Iterable[Axes] | None = None,
2216+
cax: matplotlib.axes.Axes | None = None,
2217+
ax: matplotlib.axes.Axes | Iterable[matplotlib.axes.Axes] | None = None,
22182218
**kwargs
22192219
) -> Colorbar:
22202220
if mappable is None:

0 commit comments

Comments
 (0)