Skip to content

Commit 87f8df3

Browse files
committed
Add an autogenerated plotting command summary.
1 parent b60f3ee commit 87f8df3

16 files changed

+404
-208
lines changed

boilerplate.py

+10-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
_fmtplot = """\
2121
# This function was autogenerated by boilerplate.py. Do not edit as
2222
# changes will be lost
23-
@autogen_docstring(Axes.%(func)s)
23+
@_autogen_docstring(Axes.%(func)s)
2424
def %(func)s(%(argspec)s):
2525
%(ax)s = gca()
2626
# allow callers to override the hold state by passing hold=True|False
@@ -246,3 +246,12 @@ def %(name)s():
246246
for name in cmaps:
247247
print _fmtcmap%locals()
248248

249+
print "# This function was autogenerated by boilerplate.py"
250+
print "def _colormaps():"
251+
print " return ["
252+
for name in cmaps:
253+
print " %r," % name
254+
print " ]"
255+
256+
print
257+
print "_setup_pyplot_info_docstrings()"

doc/_templates/index.html

+2-2
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ <h1>Introduction</h1>
6262
For a sampling, see the <a href="{{ pathto('users/screenshots') }}">screenshots</a>, <a href="{{ pathto('gallery') }}">thumbnail</a> gallery, and
6363
<a href="examples/index.html">examples</a> directory</p>
6464

65-
<p>For example, using "ipython -pylab" to provide an interactive
65+
<p>For example, using <tt>"ipython --pylab"</tt> to provide an interactive
6666
environment, to generate 10,000 gaussian random numbers and plot a
6767
histogram with 100 bins, you simply need to
6868
type</p>
@@ -91,7 +91,7 @@ <h1>Documentation</h1>
9191

9292
<p>Trying to learn how to do a particular kind of plot? Check out
9393
the <a href="gallery.html">gallery</a>, <a href="examples/index.html">examples</a>,
94-
or the <a href="api/pyplot_api.html">list of plotting
94+
or the <a href="api/pyplot_summary.html">list of plotting
9595
commands</a>.</p>
9696

9797
<h4>Other learning resources</h4>

doc/api/index.rst

+1
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
.. toctree::
1313
:maxdepth: 1
1414

15+
pyplot_summary.rst
1516
api_changes.rst
1617
matplotlib_configuration_api.rst
1718
afm_api.rst

doc/api/pyplot_api.rst

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
******
22
pyplot
33
******
4-
4+
55

66
:mod:`matplotlib.pyplot`
77
========================
@@ -10,3 +10,4 @@ pyplot
1010
:members:
1111
:undoc-members:
1212
:show-inheritance:
13+
:exclude-members: plotting colormaps

doc/api/pyplot_summary.rst

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
Plotting commands summary
2+
=========================
3+
4+
.. currentmodule:: matplotlib.pyplot
5+
6+
.. autofunction:: plotting
7+
8+
.. autofunction:: colormaps

doc/conf.py

+2
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,8 @@
7474
# The name of the Pygments (syntax highlighting) style to use.
7575
pygments_style = 'sphinx'
7676

77+
default_role = 'obj'
78+
7779
# Plot directive configuration
7880
# ----------------------------
7981

lib/matplotlib/__init__.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -871,7 +871,7 @@ def rc(group, **kwargs):
871871

872872
def rcdefaults():
873873
"""
874-
Restore the default rc params - these are not the params loaded by
874+
Restore the default rc params. These are not the params loaded by
875875
the rc file, but mpl's internal params. See rc_file_defaults for
876876
reloading the default params from the rc file
877877
"""

lib/matplotlib/artist.py

+4
Original file line numberDiff line numberDiff line change
@@ -730,6 +730,8 @@ def set(self, **kwargs):
730730

731731
def findobj(self, match=None, include_self=True):
732732
"""
733+
Find artist objects.
734+
733735
pyplot signature:
734736
findobj(o=gcf(), match=None, include_self=True)
735737
@@ -1135,6 +1137,8 @@ def getp(obj, property=None):
11351137

11361138
def setp(obj, *args, **kwargs):
11371139
"""
1140+
Set a property on an artist object.
1141+
11381142
matplotlib supports the use of :func:`setp` ("set property") and
11391143
:func:`getp` to set and get object properties, as well as to do
11401144
introspection on the object. For example, to set the linestyle of a

0 commit comments

Comments
 (0)