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

Skip to content

Commit 43f3590

Browse files
committed
tweaks to backend driver list
svn path=/trunk/matplotlib/; revision=6528
1 parent 566b9bc commit 43f3590

File tree

3 files changed

+41
-47
lines changed

3 files changed

+41
-47
lines changed

CHANGELOG

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
2008-12-08 Removed the prints in the set_*style commands. Return the
2+
list of pprinted strings instead
3+
14
2008-12-08 Some of the changes Michael made to improve the output of
25
the property tables in the rest docs broke of made
36
difficult to use some of the interactive doc helpers, eg

examples/tests/backend_driver.py

Lines changed: 8 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525

2626
pylab_dir = os.path.join('..', 'pylab_examples')
2727
pylab_files = [
28-
'two_scales.py',
28+
2929

3030
'accented_text.py',
3131
'alignment_test.py',
@@ -191,44 +191,40 @@
191191
'unicode_demo.py',
192192
'vertical_ticklabels.py',
193193
'vline_demo.py',
194-
'webapp_demo.py',
195194
'xcorr_demo.py',
196195
'zorder_demo.py',
197-
198196
]
199197

200198

201199
api_dir = os.path.join('..', 'api')
202200
api_files = [
203201
'agg_oo.py',
204202
'barchart_demo.py',
203+
'bbox_intersect.py',
205204
'collections_demo.py',
205+
'color_cycle.py',
206+
'colorbar_only.py',
206207
'custom_projection_example.py',
207208
'custom_scale_example.py',
208209
'date_demo.py',
209210
'date_index_formatter.py',
211+
'donut_demo.py',
210212
'font_family_rc.py',
211-
'font_file.py',
212213
'histogram_demo.py',
213214
'image_zcoord.py',
214215
'legend_demo.py',
215216
'line_with_text.py',
216217
'logo2.py',
217218
'mathtext_asarray.py',
218219
'patch_collection.py',
220+
'path_patch_demo.py',
221+
'quad_bezier.py',
219222
'scatter_piecharts.py',
220223
'span_regions.py',
224+
'two_scales.py'
221225
'unicode_minus.py',
222226
'watermark_image.py',
223227
'watermark_text.py',
224-
225-
'bbox_intersect.py',
226-
'colorbar_only.py',
227-
'color_cycle.py',
228-
'donut_demo.py',
229-
'path_patch_demo.py',
230-
'quad_bezier.py',
231-
'two_scales.py'
232228
]
233229

234230
units_dir = os.path.join('..', 'units')

lib/matplotlib/patches.py

Lines changed: 30 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -1494,19 +1494,19 @@ class BoxStyle(_Style):
14941494
:class:`BoxStyle` is a container class which defines several
14951495
boxstyle classes, which are used for :class:`FancyBoxPatch`.
14961496
1497-
A style object can be created as
1497+
A style object can be created as::
14981498
14991499
BoxStyle.Round(pad=0.2)
15001500
1501-
or
1501+
or::
15021502
15031503
BoxStyle("Round", pad=0.2)
15041504
1505-
or
1505+
or::
15061506
15071507
BoxStyle("Round, pad=0.2")
15081508
1509-
Following boxstyle classes are defined.
1509+
The following boxstyle classes are defined.
15101510
15111511
%(AvailableBoxstyles)s
15121512
@@ -2026,18 +2026,15 @@ def set_boxstyle(self, boxstyle=None, **kw):
20262026
20272027
Old attrs simply are forgotten.
20282028
2029-
Without argument (or with *boxstyle* = None), it prints out
2029+
Without argument (or with *boxstyle* = None), it returns
20302030
available box styles.
20312031
20322032
ACCEPTS: [ %(AvailableBoxstyles)s ]
20332033
20342034
"""
20352035

20362036
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()
20412038

20422039
if isinstance(boxstyle, BoxStyle._Base):
20432040
self._bbox_transmuter = boxstyle
@@ -2097,7 +2094,7 @@ def get_path(self):
20972094
return _path
20982095

20992096

2100-
# Followong methods are borrowed from the Rectangle class.
2097+
# Following methods are borrowed from the Rectangle class.
21012098

21022099
def get_x(self):
21032100
"Return the left coord of the rectangle"
@@ -2183,19 +2180,19 @@ class ConnectionStyle(_Style):
21832180
between two points. These are mainly used with
21842181
:class:`FancyArrowPatch`.
21852182
2186-
A connectionstyle object can be either created as
2183+
A connectionstyle object can be either created as::
21872184
21882185
ConnectionStyle.Arc3(rad=0.2)
21892186
2190-
or
2187+
or::
21912188
21922189
ConnectionStyle("Arc3", rad=0.2)
21932190
2194-
or
2191+
or::
21952192
21962193
ConnectionStyle("Arc3, rad=0.2")
21972194
2198-
Following classes are defined
2195+
The following classes are defined
21992196
22002197
%(AvailableConnectorstyles)s
22012198
@@ -2205,11 +2202,13 @@ class ConnectionStyle(_Style):
22052202
22062203
__call__(self, posA, posB, patchA=None, patchB=None, shrinkA=2., shrinkB=2.)
22072204
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+
22132212
"""
22142213

22152214
_style_list = {}
@@ -2547,18 +2546,18 @@ class ArrowStyle(_Style):
25472546
arrowstyle classes, which is used to create an arrow path along a
25482547
given path. These are mainly used with :class:`FancyArrowPatch`.
25492548
2550-
A arrowstyle object can be either created as
2549+
A arrowstyle object can be either created as::
25512550
25522551
ArrowStyle.Fancy(head_length=.4, head_width=.4, tail_width=.4)
2553-
or
2552+
or::
25542553
25552554
ArrowStyle("Fancy", head_length=.4, head_width=.4, tail_width=.4)
25562555
2557-
or
2556+
or::
25582557
25592558
ArrowStyle("Fancy, head_length=.4, head_width=.4, tail_width=.4")
25602559
2561-
Following classes are defined
2560+
The following classes are defined
25622561
25632562
%(AvailableArrowstyles)s
25642563
@@ -3232,7 +3231,7 @@ def __init__(self, posA=None, posB=None,
32323231
connected. It can be an instance of the ConnectionStyle class
32333232
(matplotlib.patches.ConnectionStlye) or a string of the
32343233
connectionstyle name, with optional comma-separated
3235-
attributes. Following connection styles are available.
3234+
attributes. The following connection styles are available.
32363235
32373236
%(AvailableConnectorstyles)s
32383237
@@ -3241,7 +3240,7 @@ def __init__(self, posA=None, posB=None,
32413240
drawn. It can be string of the available arrowstyle names,
32423241
with optional comma-separated attributes, or one of the
32433242
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
32453244
available.
32463245
32473246
%(AvailableArrowstyles)s
@@ -3334,14 +3333,12 @@ def set_connectionstyle(self, connectionstyle, **kw):
33343333
33353334
Old attrs simply are forgotten.
33363335
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.
33393338
"""
33403339

33413340
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()
33453342

33463343
if isinstance(connectionstyle, ConnectionStyle._Base):
33473344
self._connector = connectionstyle
@@ -3372,14 +3369,12 @@ def set_arrowstyle(self, arrowstyle=None, **kw):
33723369
33733370
Old attrs simply are forgotten.
33743371
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.
33773374
"""
33783375

33793376
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()
33833378

33843379
if isinstance(arrowstyle, ConnectionStyle._Base):
33853380
self._arrow_transmuter = arrowstyle

0 commit comments

Comments
 (0)