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

Skip to content

Commit c9fe363

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 c9fe363

File tree

4 files changed

+370
-94
lines changed

4 files changed

+370
-94
lines changed

doc/api/pyplot_summary.rst

Lines changed: 140 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,17 +5,150 @@
55
Pyplot function overview
66
------------------------
77

8-
.. currentmodule:: matplotlib
8+
.. currentmodule:: matplotlib.pyplot
99

1010
.. autosummary::
1111
:toctree: _as_gen
12-
:template: autofunctions.rst
13-
14-
pyplot
15-
16-
.. currentmodule:: matplotlib.pyplot
12+
:template: autosummary.rst
13+
:nosignatures:
1714

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

20153

21154
Colors in Matplotlib

0 commit comments

Comments
 (0)
0