8000 Merge pull request #22669 from timhoffm/doc-pyplot · matplotlib/matplotlib@8788dcc · GitHub
[go: up one dir, main page]

Skip to content

Commit 8788dcc

Browse files
authored
Merge pull request #22669 from timhoffm/doc-pyplot
Cleanup documentation generation for pyplot
2 parents 534fbb0 + 032316b commit 8788dcc

File tree

5 files changed

+415
-107
lines changed

5 files changed

+415
-107
lines changed

doc/api/pyplot_summary.rst

Lines changed: 165 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -2,35 +2,184 @@
22
``matplotlib.pyplot``
33
*********************
44

5-
Pyplot function overview
6-
------------------------
5+
.. currentmodule:: matplotlib.pyplot
76

8-
.. currentmodule:: matplotlib
7+
.. automodule:: matplotlib.pyplot
8+
:no-members:
9+
:no-undoc-members:
910

10-
.. autosummary::
11-
:toctree: _as_gen
12-
:template: autofunctions.rst
1311

14-
pyplot
12+
Plotting commands
13+
-----------------
1514

16-
.. currentmodule:: matplotlib.pyplot
15+
.. autosummary::
16+
:toctree: _as_gen
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+
pause
91+
pcolor
92+
pcolormesh
93+
phase_spectrum
94+
pie
95+
plot
96+
plot_date
97+
polar
98+
psd
99+
quiver
100+
quiverkey
101+
rc
102+
rc_context
103+
rcdefaults
104+
rgrids
105+
savefig
106+
sca
107+
scatter
108+
sci
109+
semilogx
110+
semilogy
111+
set_cmap
112+
set_loglevel
113+
setp
114+
show
115+
specgram
116+
spy
117+
stackplot
118+
stairs
119+
stem
120+
step
121+
streamplot
122+
subplot
123+
subplot2grid
124+
subplot_mosaic
125+
subplot_tool
126+
subplots
127+
subplots_adjust
128+
suptitle
129+
switch_backend
130+
table
131+
text
132+
thetagrids
133+
tick_params
134+
ticklabel_format
135+
tight_layout
136+
title
137+
tricontour
138+
tricontourf
139+
tripcolor
140+
triplot
141+
twinx
142+
twiny
143+
uninstall_repl_displayhook
144+
violinplot
145+
vlines
146+
xcorr
147+
xkcd
148+
xlabel
149+
xlim
150+
xscale
151+
xticks
152+
ylabel
153+
ylim
154+
yscale
155+
yticks
19156

20157

21-
Colors in Matplotlib
22-
--------------------
158+
Other commands
159+
--------------
160+
.. autosummary::
161+
:toctree: _as_gen
162+
:template: autosummary.rst
163+
:nosignatures:
23164

24-
There are many colormaps you can use to map data onto color values.
25-
Below we list several ways in which color can be utilized in Matplotlib.
165+
connect
166+
disconnect
167+
get_current_fig_manager
168+
ginput
169+
new_figure_manager
170+
waitforbuttonpress
26171

27-
For a more in-depth look at colormaps, see the
28-
:doc:`/tutorials/colors/colormaps` tutorial.
29172

30-
.. currentmodule:: matplotlib.pyplot
173+
Colormaps
174+
---------
175+
Colormaps are available via the colormap registry `matplotlib.colormaps`. For
176+
convenience this registry is available in ``pyplot`` as
31177

32178
.. autodata:: colormaps
33179
:no-value:
34180

181+
Additionally, there are shortcut functions to set builtin colormaps; e.g.
182+
``plt.viridis()`` is equivalent to ``plt.set_cmap('viridis')``.
183+
35184
.. autodata:: color_sequences
36185
:no-value:

lib/matplotlib/axes/_base.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2163,7 +2163,7 @@ def _sci(self, im):
21632163
Set the current image.
21642164
21652165
This image will be the target of colormap functions like
2166-
`~.pyplot.viridis`, and other functions such as `~.pyplot.clim`. The
2166+
``pyplot.viridis``, and other functions such as `~.pyplot.clim`. The
21672167
current image is an attribute of the current Axes.
21682168
"""
21692169
_api.check_isinstance(

0 commit comments

Comments
 (0)
0