@@ -1494,19 +1494,19 @@ class BoxStyle(_Style):
1494
1494
:class:`BoxStyle` is a container class which defines several
1495
1495
boxstyle classes, which are used for :class:`FancyBoxPatch`.
1496
1496
1497
- A style object can be created as
1497
+ A style object can be created as::
1498
1498
1499
1499
BoxStyle.Round(pad=0.2)
1500
1500
1501
- or
1501
+ or::
1502
1502
1503
1503
BoxStyle("Round", pad=0.2)
1504
1504
1505
- or
1505
+ or::
1506
1506
1507
1507
BoxStyle("Round, pad=0.2")
1508
1508
1509
- Following boxstyle classes are defined.
1509
+ The following boxstyle classes are defined.
1510
1510
1511
1511
%(AvailableBoxstyles)s
1512
1512
@@ -2026,18 +2026,15 @@ def set_boxstyle(self, boxstyle=None, **kw):
2026
2026
2027
2027
Old attrs simply are forgotten.
2028
2028
2029
- Without argument (or with *boxstyle* = None), it prints out
2029
+ Without argument (or with *boxstyle* = None), it returns
2030
2030
available box styles.
2031
2031
2032
2032
ACCEPTS: [ %(AvailableBoxstyles)s ]
2033
2033
2034
2034
"""
2035
2035
2036
2036
if boxstyle == None :
2037
- # print out available boxstyles and return.
2038
- print "Following box styles are available:"
2039
- print BoxStyle .pprint_styles ()
2040
- return
2037
+ return BoxStyle .pprint_styles ()
2041
2038
2042
2039
if isinstance (boxstyle , BoxStyle ._Base ):
2043
2040
self ._bbox_transmuter = boxstyle
@@ -2097,7 +2094,7 @@ def get_path(self):
2097
2094
return _path
2098
2095
2099
2096
2100
- # Followong methods are borrowed from the Rectangle class.
2097
+ # Following methods are borrowed from the Rectangle class.
2101
2098
2102
2099
def get_x (self ):
2103
2100
"Return the left coord of the rectangle"
@@ -2183,19 +2180,19 @@ class ConnectionStyle(_Style):
2183
2180
between two points. These are mainly used with
2184
2181
:class:`FancyArrowPatch`.
2185
2182
2186
- A connectionstyle object can be either created as
2183
+ A connectionstyle object can be either created as::
2187
2184
2188
2185
ConnectionStyle.Arc3(rad=0.2)
2189
2186
2190
- or
2187
+ or::
2191
2188
2192
2189
ConnectionStyle("Arc3", rad=0.2)
2193
2190
2194
- or
2191
+ or::
2195
2192
2196
2193
ConnectionStyle("Arc3, rad=0.2")
2197
2194
2198
- Following classes are defined
2195
+ The following classes are defined
2199
2196
2200
2197
%(AvailableConnectorstyles)s
2201
2198
@@ -2205,11 +2202,13 @@ class ConnectionStyle(_Style):
2205
2202
2206
2203
__call__(self, posA, posB, patchA=None, patchB=None, shrinkA=2., shrinkB=2.)
2207
2204
2208
- and it returns a :class:`Path` instance. *posA* and *posB are tuples
2209
- of x,y coordinates of the two points to be connected. *patchA* (or
2210
- $patchB*) is given, the returned path is clipped so that it start
2211
- (or end) from the boundary of the patch. The path is further
2212
- shrinked by *shrinkA* (or *shrinkB*) which is given in points.
2205
+ and it returns a :class:`Path` instance. *posA* and *posB* are
2206
+ tuples of x,y coordinates of the two points to be
2207
+ connected. *patchA* (or *patchB*) is given, the returned path is
2208
+ clipped so that it start (or end) from the boundary of the
2209
+ patch. The path is further shrunk by *shrinkA* (or *shrinkB*)
2210
+ which is given in points.
2211
+
2213
2212
"""
2214
2213
2215
2214
_style_list = {}
@@ -2547,18 +2546,18 @@ class ArrowStyle(_Style):
2547
2546
arrowstyle classes, which is used to create an arrow path along a
2548
2547
given path. These are mainly used with :class:`FancyArrowPatch`.
2549
2548
2550
- A arrowstyle object can be either created as
2549
+ A arrowstyle object can be either created as::
2551
2550
2552
2551
ArrowStyle.Fancy(head_length=.4, head_width=.4, tail_width=.4)
2553
- or
2552
+ or::
2554
2553
2555
2554
ArrowStyle("Fancy", head_length=.4, head_width=.4, tail_width=.4)
2556
2555
2557
- or
2556
+ or::
2558
2557
2559
2558
ArrowStyle("Fancy, head_length=.4, head_width=.4, tail_width=.4")
2560
2559
2561
- Following classes are defined
2560
+ The following classes are defined
2562
2561
2563
2562
%(AvailableArrowstyles)s
2564
2563
@@ -3232,7 +3231,7 @@ def __init__(self, posA=None, posB=None,
3232
3231
connected. It can be an instance of the ConnectionStyle class
3233
3232
(matplotlib.patches.ConnectionStlye) or a string of the
3234
3233
connectionstyle name, with optional comma-separated
3235
- attributes. Following connection styles are available.
3234
+ attributes. The following connection styles are available.
3236
3235
3237
3236
%(AvailableConnectorstyles)s
3238
3237
@@ -3241,7 +3240,7 @@ def __init__(self, posA=None, posB=None,
3241
3240
drawn. It can be string of the available arrowstyle names,
3242
3241
with optional comma-separated attributes, or one of the
3243
3242
ArrowStyle instance. The optional attributes are meant to be
3244
- scaled with the *mutation_scale*. Following arrow styles are
3243
+ scaled with the *mutation_scale*. The following arrow styles are
3245
3244
available.
3246
3245
3247
3246
%(AvailableArrowstyles)s
@@ -3334,14 +3333,12 @@ def set_connectionstyle(self, connectionstyle, **kw):
3334
3333
3335
3334
Old attrs simply are forgotten.
3336
3335
3337
- Without argument (or with connectionstyle=None), it prints out
3338
- available styles.
3336
+ Without argument (or with connectionstyle=None), return
3337
+ available styles as a list of strings .
3339
3338
"""
3340
3339
3341
3340
if connectionstyle == None :
3342
- # print out available styles and return.
3343
- print "Following styles are available:"
3344
- print ConnectionStyle .pprint_styles ()
3341
+ return ConnectionStyle .pprint_styles ()
3345
3342
3346
3343
if isinstance (connectionstyle , ConnectionStyle ._Base ):
3347
3344
self ._connector = connectionstyle
@@ -3372,14 +3369,12 @@ def set_arrowstyle(self, arrowstyle=None, **kw):
3372
3369
3373
3370
Old attrs simply are forgotten.
3374
3371
3375
- Without argument (or with arrowstyle=None), it prints out
3376
- available box styles.
3372
+ Without argument (or with arrowstyle=None), return
3373
+ available box styles as a list of strings .
3377
3374
"""
3378
3375
3379
3376
if arrowstyle == None :
3380
- # print out available styles and return.
3381
- print "Following styles are available:"
3382
- print ArrowStyle .pprint_styles ()
3377
+ return ArrowStyle .pprint_styles ()
3383
3378
3384
3379
if isinstance (arrowstyle , ConnectionStyle ._Base ):
3385
3380
self ._arrow_transmuter = arrowstyle
0 commit comments