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

Skip to content

Commit e2d286b

Browse files
committed
modify formatting of comments in matplotlib.conf
svn path=/trunk/matplotlib/; revision=4248
1 parent 086c046 commit e2d286b

4 files changed

Lines changed: 23 additions & 24 deletions

File tree

lib/matplotlib/config/mplconfig.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -43,11 +43,11 @@ class MPLConfig(TConfig):
4343
the default values listed herein.
4444
4545
Colors: for the color values below, you can either use
46-
- a matplotlib color string, such as r, k, or b
46+
- a matplotlib color string, such as r | k | b
4747
- an rgb tuple, such as (1.0, 0.5, 0.0)
4848
- a hex string, such as #ff00ff or ff00ff
4949
- a scalar grayscale intensity such as 0.75
50-
- a legal html color name, eg red, blue, darkslategray
50+
- a legal html color name, eg red | blue | darkslategray
5151
5252
Interactivity: see http://matplotlib.sourceforge.net/interactive.html.
5353
@@ -63,8 +63,6 @@ class MPLConfig(TConfig):
6363
units = T.false
6464

6565
class backend(TConfig):
66-
"""Valid backends are: 'GTKAgg', 'GTKCairo', 'QtAgg', 'Qt4Agg',
67-
'TkAgg', 'Agg', 'Cairo', 'PS', 'PDF', 'SVG'"""
6866
use = T.Trait('Agg', mplT.BackendHandler())
6967

7068
class cairo(TConfig):

lib/matplotlib/config/mpltraits.py

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -24,18 +24,22 @@ def is_string_like(obj):
2424
class BackendHandler(T.TraitHandler):
2525
"""
2626
"""
27-
backends = {'tkagg': 'TkAgg',
27+
backends = {'agg': 'Agg',
28+
'cairo': 'Cairo',
29+
'cocoaagg': 'CocoaAgg',
30+
'fltkagg': 'FltkAgg',
31+
'gtk': 'GTK',
2832
'gtkagg': 'GTKAgg',
2933
'gtkcairo': 'GTKCairo',
34+
'pdf': 'Pdf',
35+
'ps': 'PS',
3036
'qt4agg': 'Qt4Agg',
3137
'qtagg': 'QtAgg',
32-
'wxagg': 'WXAgg',
33-
'agg': 'Agg',
34-
'cairo': 'Cairo',
35-
'ps': 'PS',
36-
'pdf': 'Pdf',
3738
'svg': 'SVG',
38-
'template': 'Template' }
39+
'template': 'Template',
40+
'tkagg': 'TkAgg',
41+
'wx': 'WX',
42+
'wxagg': 'WXAgg'}
3943

4044
def validate(self, object, name, value):
4145
try:
@@ -46,7 +50,7 @@ def validate(self, object, name, value):
4650
def info(self):
4751
be = self.backends.keys()
4852
be.sort
49-
return "one of %s"% ', '.join(['%s'%i for i in be])
53+
return "one of: %s"% ' | '.join(['%s'%i for i in be])
5054

5155

5256
class BoolHandler(T.TraitHandler):
@@ -73,7 +77,7 @@ def validate(self, object, name, value):
7377
return self.error(object, name, value)
7478

7579
def info(self):
76-
return "one of %s"% ', '.join(['%s'%i for i in self.bools.keys()])
80+
return "one of: %s"% ' | '.join(['%s'%i for i in self.bools.keys()])
7781

7882
flexible_true = T.Trait(True, BoolHandler())
7983
flexible_false = T.Trait(False, BoolHandler())

lib/matplotlib/mpl-data/matplotlib.conf.template

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -21,19 +21,19 @@
2121
# the default values listed herein.
2222
#
2323
# Colors: for the color values below, you can either use
24-
# - a matplotlib color string, such as r, k, or b
24+
# - a matplotlib color string, such as r | k | b
2525
# - an rgb tuple, such as (1.0, 0.5, 0.0)
2626
# - a hex string, such as #ff00ff or ff00ff
2727
# - a scalar grayscale intensity such as 0.75
28-
# - a legal html color name, eg red, blue, darkslategray
28+
# - a legal html color name, eg red | blue | darkslategray
2929
#
3030
# Interactivity: see http://matplotlib.sourceforge.net/interactive.html.
3131
#
3232
# ### CONFIGURATION BEGINS HERE ###
3333

3434
# a value of type 'str'
3535
datapath = '/usr/lib64/python2.5/site-packages/matplotlib/mpl-data'
36-
# one of 0, on, false, 1, no, n, y, off, yes, true
36+
# one of: 0 | on | false | 1 | no | n | y | off | yes | true
3737
interactive = False
3838
# a value of type 'bool'
3939
maskedarray = False
@@ -64,9 +64,9 @@ units = False
6464
# name like 'orange', a hex color like '#efefef', a grayscale intensity
6565
# like '0.5', or an RGBA tuple (1,0,0,1)
6666
facecolor = 'white'
67-
# one of 0, on, false, 1, no, n, y, off, yes, true
67+
# one of: 0 | on | false | 1 | no | n | y | off | yes | true
6868
grid = False
69-
# one of 0, on, false, 1, no, n, y, off, yes, true
69+
# one of: 0 | on | false | 1 | no | n | y | off | yes | true
7070
hold = True
7171
# any valid matplotlib color, eg an abbreviation like 'r' for red, a full
7272
# name like 'orange', a hex color like '#efefef', a grayscale intensity
@@ -77,7 +77,7 @@ units = False
7777
labelsize = 'medium'
7878
# a value of type 'float'
7979
linewidth = 1.0
80-
# one of 0, on, false, 1, no, n, y, off, yes, true
80+
# one of: 0 | on | false | 1 | no | n | y | off | yes | true
8181
polargrid = True
8282
# a value of type 'float' or 'xx-small' or 'x-small' or 'small' or 'medium'
8383
# or 'large' or 'x-large' or 'xx-large'
@@ -88,10 +88,8 @@ units = False
8888
limits = [-7.0, 7.0]
8989

9090
[backend]
91-
# Valid backends are: 'GTKAgg', 'GTKCairo', 'QtAgg', 'Qt4Agg',
92-
# 'TkAgg', 'Agg', 'Cairo', 'PS', 'PDF', 'SVG'
93-
# one of ps, qt4agg, tkagg, gtkagg, agg, cairo, gtkcairo, wxagg, qtagg, temp
94-
# late, svg, pdf
91+
# one of: ps | qt4agg | fltkagg | gtkagg | agg | cairo | gtk | gtkcairo | wx
92+
# agg | tkagg | qtagg | template | svg | cocoaagg | pdf | wx
9593
use = 'Agg'
9694

9795
[[cairo]]

setup.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,6 @@
169169
if options['build_gtk']:
170170
if hasgtk or (options['build_gtk'] is True):
171171
build_gdk(ext_modules, packages)
172-
rc['backend'] = 'GTK'
173172
if options['build_gtkagg']:
174173
if hasgtk or (options['build_gtkagg'] is True):
175174
options['build_agg'] = 1

0 commit comments

Comments
 (0)