10000 Cleanup documentation generation for pyplot · matplotlib/matplotlib@63ff2ee · GitHub
[go: up one dir, main page]

Skip to content

Commit 63ff2ee

Browse files
committed
Cleanup documentation generation for pyplot
- remove the awkward `pyplot.plotting()` function, which only served as a namespace to take up the docs for pyplot and output them via `.. autofunction` - Instead generate the same information using `.. autosummary::`. We have to list the desired methods here explicitly. I've added a test that these are the same as previously auto-generated in the `plotting()` docstring. If we change anything in pyplot, we'll be notified through the test failure that we have to adapt the autosummary list. - Removed the docstring generation logic `_setup_pyplot_info_docstrings()`. Apart from generating the `plotting()` docstring, this added docstrings to the pyplot colormap setters. Instead, we now add these docstrings directly via boilerplate.py
1 parent a2ddfc0 commit 63ff2ee

File tree

4 files changed

+377
-96
lines changed

4 files changed

+377
-96
lines changed

doc/api/pyplot_summary.rst

Lines changed: 146 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,20 +2,158 @@
22
``matplotlib.pyplot``
33
*********************
44

5+
.. currentmodule:: matplotlib.pyplot
6+
7+
.. automodule:: matplotlib.pyplot
8+
:no-members:
9+
:no-undoc-members:
10+
11+
512
Pyplot function overview
613
------------------------
714

8-
.. currentmodule:: matplotlib
9-
1015
.. autosummary::
1116
:toctree: _as_gen
12-
:template: autofunctions.rst
13-
14-
pyplot
15-
16-
.. currentmodule:: matplotlib.pyplot
17+
:template: autosummary.rst
18+
:nosignatures:
1719

18-
.. autofunction:: plotting
20+
acorr
21+
angle_spectrum
22+
annotate
23+
arrow
24+
autoscale
25+
axes
26+
axhline
27+
axhspan
28+
axis
29+
axline
30+
axvline
31+
axvspan
32+
bar
33+
bar_label
34+
barbs
35+
barh
36+
box
37+
boxplot
38+
broken_barh
39+
cla
40+
clabel
41+
clf
42+
clim
43+
close
44+
cohere
45+
colorbar
46+
contour
47+
contourf
48+
csd
49+
delaxes
50+
draw
51+
draw_if_interactive
52+
errorbar
53+
eventplot
54+
figimage
55+
figlegend
56+
fignum_exists
57+
figtext
58+
figure
59+
fill
60+
fill_between
61+
fill_betweenx
62+
findobj
63+
gca
64+
gcf
65+
gci
66+
get
67+
get_figlabels
68+
get_fignums
69+
getp
70+
grid
71+
hexbin
72+
hist
73+
hist2d
74+
hlines
75+
imread
76+
imsave
77+
imshow
78+
install_repl_displayhook
79+
ioff
80+
ion
81+
isinteractive
82+
legend
83+
locator_params
84+
loglog
85+
magnitude_spectrum
86+
margins
87+
matshow
88+
minorticks_off
89+
minorticks_on
90+
new_figure_manager
91+
pause
92+
pcolor
93+
pcolormesh
94+
phase_spectrum
95+
pie
96+
plot
97+
plot_date
98+
polar
99+
psd
100+
quiver
101+
quiverkey
102+
rc
103+
rc_context
104+
rcdefaults
105+
rgrids
106+
savefig
107+
sca
108+
scatter
109+
sci
110+
semilogx
111+
semilogy
112+
set_cmap
113+
set_loglevel
114+
setp
115+
show
116+
specgram
117+
spy
118+
stackplot
119+
stairs
120+
stem
121+
step
122+
streamplot
123+
subplot
124+
subplot2grid
125+
subplot_mosaic
126+
subplot_tool
127+
subplots
128+
subplots_adjust
129+
suptitle
130+
switch_backend
131+
table
132+
text
133+
thetagrids
134+
tick_params
135+
ticklabel_format
136+
tight_layout
137+
title
138+
tricontour
139+
tricontourf
140+
tripcolor
141+
triplot
142+
twinx
143+
twiny
144+
uninstall_repl_displayhook
145+
violinplot
146+
vlines
147+
xcorr
148+
xkcd
149+
xlabel
150+
xlim
151+
xscale
152+
xticks
153+
ylabel
154+
ylim
155+
yscale
156+
yticks
19157

20158

21159
Colors in Matplotlib

0 commit comments

Comments
 (0)
0