Skip to content

Commit b50737e

Browse files
committed
continue conversion of docstrings to restructured text
svn path=/trunk/matplotlib/; revision=5351
1 parent 4759210 commit b50737e

File tree

7 files changed

+666
-555
lines changed

7 files changed

+666
-555
lines changed

boilerplate.py

+1
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ def %(func)s(*args, **kwargs):
2828
return ret
2929
if Axes.%(func)s.__doc__ is not None:
3030
%(func)s.__doc__ = dedent(Axes.%(func)s.__doc__) + \"\"\"
31+
3132
Additional kwargs: hold = [True|False] overrides default hold state\"\"\"
3233
"""
3334

lib/matplotlib/__init__.py

+19-15
Original file line numberDiff line numberDiff line change
@@ -653,38 +653,42 @@ def rc(group, **kwargs):
653653
for lines.linewidth the group is 'lines', for axes.facecolor, the
654654
group is 'axes', and so on. Group may also be a list or tuple
655655
of group names, eg ('xtick','ytick'). kwargs is a list of
656-
attribute name/value pairs, eg
656+
attribute name/value pairs, eg::
657657
658658
rc('lines', linewidth=2, color='r')
659659
660-
sets the current rc params and is equivalent to
660+
sets the current rc params and is equivalent to::
661661
662662
rcParams['lines.linewidth'] = 2
663663
rcParams['lines.color'] = 'r'
664664
665665
The following aliases are available to save typing for interactive
666-
users
667-
'lw' : 'linewidth'
668-
'ls' : 'linestyle'
669-
'c' : 'color'
670-
'fc' : 'facecolor'
671-
'ec' : 'edgecolor'
672-
'mew' : 'markeredgewidth'
673-
'aa' : 'antialiased'
674-
675-
Thus you could abbreviate the above rc command as
666+
users:
667+
668+
===== =================
669+
Alias Property
670+
===== =================
671+
'lw' 'linewidth'
672+
'ls' 'linestyle'
673+
'c' 'color'
674+
'fc' 'facecolor'
675+
'ec' 'edgecolor'
676+
'mew' 'markeredgewidth'
677+
'aa' 'antialiased'
678+
===== =================
679+
680+
Thus you could abbreviate the above rc command as::
676681
677682
rc('lines', lw=2, c='r')
678683
679684
680685
Note you can use python's kwargs dictionary facility to store
681686
dictionaries of default parameters. Eg, you can customize the
682-
font rc as follows
687+
font rc as follows::
683688
684689
font = {'family' : 'monospace',
685690
'weight' : 'bold',
686-
'size' : 'larger',
687-
}
691+
'size' : 'larger'}
688692
689693
rc('font', **font) # pass in the font dict as kwargs
690694

lib/matplotlib/artist.py

+9-9
Original file line numberDiff line numberDiff line change
@@ -724,27 +724,27 @@ def setp(h, *args, **kwargs):
724724
If you want to see all the properties that can be set, and their
725725
possible values, you can do
726726
727-
728727
>>> setp(line)
729-
... long output listing omitted'
728+
... long output listing omitted
730729
731730
setp operates on a single instance or a list of instances. If you
732731
are in query mode introspecting the possible values, only the first
733732
instance in the sequence is used. When actually setting values,
734733
all the instances will be set. Eg, suppose you have a list of two
735734
lines, the following will make both lines thicker and red
736735
737-
>>> x = arange(0,1.0,0.01)
738-
>>> y1 = sin(2*pi*x)
739-
>>> y2 = sin(4*pi*x)
740-
>>> lines = plot(x, y1, x, y2)
741-
>>> setp(lines, linewidth=2, color='r')
736+
>>> x = arange(0,1.0,0.01)
737+
>>> y1 = sin(2*pi*x)
738+
>>> y2 = sin(4*pi*x)
739+
>>> lines = plot(x, y1, x, y2)
740+
>>> setp(lines, linewidth=2, color='r')
742741
743742
setp works with the matlab(TM) style string/value pairs or with
744743
python kwargs. For example, the following are equivalent
745744
746-
>>> setp(lines, 'linewidth', 2, 'color', r') # matlab style
747-
>>> setp(lines, linewidth=2, color='r') # python style
745+
>>> setp(lines, 'linewidth', 2, 'color', r') # matlab style
746+
>>> setp(lines, linewidth=2, color='r') # python style
747+
748748
"""
749749

750750
insp = ArtistInspector(h)

0 commit comments

Comments
 (0)