Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 823f3a4

Browse files
committed
fixed some doc formatting errors
svn path=/trunk/matplotlib/; revision=6522
1 parent bd44468 commit 823f3a4

3 files changed

Lines changed: 25 additions & 18 deletions

File tree

lib/matplotlib/legend.py

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -123,28 +123,26 @@ def __init__(self, parent, handles, labels,
123123
124124
Optional keyword arguments:
125125
126-
================ =================================================
126+
================ ==================================================================
127127
Keyword Description
128-
================ =================================================
129-
128+
================ ==================================================================
130129
loc a location code or a tuple of coordinates
131130
numpoints the number of points in the legend line
132131
prop the font property
133132
markerscale the relative size of legend markers vs. original
134133
fancybox if True, draw a frame with a round fancybox. If None, use rc
135134
shadow if True, draw a shadow behind legend
136135
scatteryoffsets a list of yoffsets for scatter symbols in legend
137-
138136
borderpad the fractional whitespace inside the legend border
139137
labelspacing the vertical space between the legend entries
140138
handlelength the length of the legend handles
141139
handletextpad the pad between the legend handle and text
142140
borderaxespad the pad between the axes and legend border
143141
columnspacing the spacing between columns
142+
================ ==================================================================
144143
145144
The dimensions of pad and spacing are given as a fraction of the
146145
fontsize. Values from rcParams will be used if None.
147-
148146
"""
149147
from matplotlib.axes import Axes # local import only to avoid circularity
150148
from matplotlib.figure import Figure # local import only to avoid circularity

lib/matplotlib/patches.py

Lines changed: 15 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1426,10 +1426,15 @@ def _pprint_styles(_styles, leadingspace=2):
14261426
args = [(argname, argdefault) \
14271427
for argname, argdefault in zip(args[1:], defaults)]
14281428
else:
1429-
args = []
1429+
args = None
1430+
1431+
if args is None:
1432+
argstr = 'None' # empy table entry crashed latex build
1433+
else:
1434+
argstr = ",".join([("%s=%s" % (an, av)) for an, av in args])
1435+
1436+
_table.append([cls.__name__, name, argstr])
14301437

1431-
_table.append([cls.__name__, name,
1432-
",".join([("%s=%s" % (an, av)) for an, av in args])])
14331438

14341439
return _pprint_table(_table)
14351440

@@ -2015,15 +2020,16 @@ def set_boxstyle(self, boxstyle=None, **kw):
20152020
comma-separated attributes. Alternatively, the attrs can
20162021
be provided as keywords::
20172022
2018-
set_boxstyle("round,pad=0.2")
2019-
set_boxstyle("round", pad=0.2)
2023+
set_boxstyle("round,pad=0.2")
2024+
set_boxstyle("round", pad=0.2)
20202025
20212026
Old attrs simply are forgotten.
20222027
20232028
Without argument (or with *boxstyle* = None), it prints out
20242029
available box styles.
20252030
20262031
ACCEPTS: [ %(AvailableBoxstyles)s ]
2032+
20272033
"""
20282034

20292035
if boxstyle==None:
@@ -2793,6 +2799,7 @@ def __init__(self):
27932799
_style_list["-"] = Curve
27942800

27952801

2802+
27962803
class CurveA(_Curve):
27972804
"""
27982805
An arrow with a head at its begin point.
@@ -2813,7 +2820,6 @@ def __init__(self, head_length=.4, head_width=.2):
28132820

28142821
_style_list["<-"] = CurveA
28152822

2816-
28172823
class CurveB(_Curve):
28182824
"""
28192825
An arrow with a head at its end point.
@@ -2832,6 +2838,7 @@ def __init__(self, head_length=.4, head_width=.2):
28322838
beginarrow=False, endarrow=True,
28332839
head_length=head_length, head_width=head_width )
28342840

2841+
#_style_list["->"] = CurveB
28352842
_style_list["->"] = CurveB
28362843

28372844

@@ -2853,6 +2860,7 @@ def __init__(self, head_length=.4, head_width=.2):
28532860
beginarrow=True, endarrow=True,
28542861
head_length=head_length, head_width=head_width )
28552862

2863+
#_style_list["<->"] = CurveAB
28562864
_style_list["<->"] = CurveAB
28572865

28582866

@@ -2960,6 +2968,7 @@ def __init__(self, widthB=1., lengthB=0.2, angleB=None):
29602968
super(ArrowStyle.BracketB, self).__init__(None, True,
29612969
widthB=widthB, lengthB=lengthB, angleB=None )
29622970

2971+
#_style_list["-["] = BracketB
29632972
_style_list["-["] = BracketB
29642973

29652974

lib/matplotlib/text.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1297,9 +1297,9 @@ def __init__(self, s, xy,
12971297
drawn. Valid keys for YAArow are
12981298
12991299
1300-
========= ===========================================================
1300+
========= =============================================================
13011301
Key Description
1302-
========= ===========================================================
1302+
========= =============================================================
13031303
width the width of the arrow in points
13041304
frac the fraction of the arrow length occupied by the head
13051305
headwidth the width of the base of the arrow head in points
@@ -1310,7 +1310,7 @@ def __init__(self, s, xy,
13101310
and base are shink percent of the distance *d* away from the
13111311
endpoints. ie, ``shrink=0.05 is 5%%``
13121312
? any key for :class:`matplotlib.patches.polygon`
1313-
========= ===========================================================
1313+
========= =============================================================
13141314
13151315
13161316
Valid keys for FancyArrowPatch are
@@ -1319,17 +1319,17 @@ def __init__(self, s, xy,
13191319
=============== ======================================================
13201320
Key Description
13211321
=============== ======================================================
1322-
arrowstyle
1323-
connectionstyle
1322+
arrowstyle the arrow style
1323+
connectionstyle the connection style
13241324
relpos default is (0.5, 0.5)
13251325
patchA default is bounding box of the text
13261326
patchB default is None
13271327
shrinkA default is 2 points
13281328
shrinkB default is 2 points
13291329
mutation_scale default is text size (in points)
13301330
mutation_aspect default is 1.
1331-
? any key for :class:`matplotlib.patches.PathPatch`
1332-
========= ===========================================================
1331+
? any key for :class:`matplotlib.patches.PathPatch`
1332+
=============== ======================================================
13331333
13341334
13351335
*xycoords* and *textcoords* are strings that indicate the

0 commit comments

Comments
 (0)