@@ -39,7 +39,7 @@ class MPLConfig(TConfig):
3939 key = val optional comment
4040
4141 val should be valid python syntax, just as you would use when setting
42- properties using rcParams. This should become more obvious by inspecting
42+ properties using rcParams. This should become more obvious by inspecting
4343 the default values listed herein.
4444
4545 Colors: for the color values below, you can either use
@@ -50,7 +50,7 @@ class MPLConfig(TConfig):
5050 - a legal html color name, eg red, blue, darkslategray
5151
5252 Interactivity: see http://matplotlib.sourceforge.net/interactive.html.
53-
53+
5454 ### CONFIGURATION BEGINS HERE ###
5555 """
5656
@@ -61,15 +61,15 @@ class MPLConfig(TConfig):
6161 numerix = T .Trait ('numpy' , 'numpy' , 'numeric' , 'numarray' )
6262 maskedarray = T .false
6363 units = T .false
64-
64+
6565 class backend (TConfig ):
6666 """Valid backends are: 'GTKAgg', 'GTKCairo', 'QtAgg', 'Qt4Agg',
6767 'TkAgg', 'Agg', 'Cairo', 'PS', 'PDF', 'SVG'"""
6868 use = T .Trait ('TkAgg' , mplT .BackendHandler ())
69-
69+
7070 class cairo (TConfig ):
7171 format = T .Trait ('png' , 'png' , 'ps' , 'pdf' , 'svg' )
72-
72+
7373 class tk (TConfig ):
7474 """
7575 window_focus : Maintain shell focus for TkAgg
@@ -78,7 +78,7 @@ class tk(TConfig):
7878
7979 window_focus = T .false
8080 pythoninspect = T .false
81-
81+
8282 class ps (TConfig ):
8383 papersize = T .Trait ('letter' , 'auto' , 'letter' , 'legal' , 'ledger' ,
8484 'A0' , 'A1' , 'A2' , 'A3' , 'A4' , 'A5' , 'A6' , 'A7' ,
@@ -87,22 +87,22 @@ class ps(TConfig):
8787 'B8' , 'B9' , 'B10' )
8888 useafm = T .false
8989 fonttype = T .Trait (3 , 42 )
90-
90+
9191 class distiller (TConfig ):
9292 use = T .Trait (None , None , 'ghostscript' , 'xpdf' , False )
9393 resolution = T .Float (6000 )
94-
94+
9595 class pdf (TConfig ):
9696 compression = T .Range (0 , 9 , 6 )
9797 fonttype = T .Trait (3 , 42 )
9898 inheritcolor = T .false
9999 use14corefonts = T .false
100-
100+
101101 class svg (TConfig ):
102102 image_inline = T .true
103103 image_noscale = T .false
104104 embed_chars = T .true
105-
105+
106106 class lines (TConfig ):
107107 linewidth = T .Float (1.0 )
108108 linestyle = T .Trait ('-' ,'--' ,'-.' , ':' , 'steps' , '' , ' ' , None )
@@ -122,10 +122,10 @@ class patch(TConfig):
122122 linewidth = T .Float (1.0 )
123123 facecolor = T .Trait ('blue' , mplT .ColorHandler ())
124124 edgecolor = T .Trait ('black' , mplT .ColorHandler ())
125- antialiased = T .true
125+ antialiased = T .true
126126
127127 class font (TConfig ):
128- family = T .Trait ('sans-serif' , 'sans-serif' , 'serif' , 'cursive' ,
128+ family = T .Trait ('sans-serif' , 'sans-serif' , 'serif' , 'cursive' ,
129129 'fantasy' , 'monospace' )
130130 style = T .Trait ('normal' , 'normal' , 'italic' , 'oblique' )
131131 variant = T .Trait ('normal' , 'normal' , 'small-caps' )
@@ -136,29 +136,29 @@ class font(TConfig):
136136 'expanded' , 'extra-expanded' , 'ultra-expanded' ,
137137 'wider' , 'narrower' )
138138 size = T .Float (12.0 )
139- serif = T .ListStr (["Bitstream Vera Serif" , "New Century Schoolbook" ,
140- "Century Schoolbook L" , "Utopia" , "ITC Bookman" , "Bookman" ,
141- "Nimbus Roman No9 L" , "Times New Roman" , "Times" , "Palatino" ,
139+ serif = T .ListStr (["Bitstream Vera Serif" , "New Century Schoolbook" ,
140+ "Century Schoolbook L" , "Utopia" , "ITC Bookman" , "Bookman" ,
141+ "Nimbus Roman No9 L" , "Times New Roman" , "Times" , "Palatino" ,
142142 "Charter" , "serif" ])
143- sans_serif = T .ListStr (["Bitstream Vera Sans" , "Lucida Grande" , "Verdana" ,
144- "Geneva" , "Lucid" , "Arial" , "Helvetica" , "Avant Garde" ,
143+ sans_serif = T .ListStr (["Bitstream Vera Sans" , "Lucida Grande" , "Verdana" ,
144+ "Geneva" , "Lucid" , "Arial" , "Helvetica" , "Avant Garde" ,
145145 "sans-serif" ])
146- cursive = T .ListStr (["Apple Chancery" , "Textile" , "Zapf Chancery" , "Sand" ,
146+ cursive = T .ListStr (["Apple Chancery" , "Textile" , "Zapf Chancery" , "Sand" ,
147147 "cursive" ])
148- fantasy = T .ListStr (["Comic Sans MS" , "Chicago" , "Charcoal" , "Impact" , "Western" ,
148+ fantasy = T .ListStr (["Comic Sans MS" , "Chicago" , "Charcoal" , "Impact" , "Western" ,
149149 "fantasy" ])
150150 monospace = T .ListStr (["Bitstream Vera Sans Mono" , "Andale Mono" , "Nimbus Mono L" ,
151151 "Courier New" , "Courier" , "Fixed" , "Terminal" , "monospace" ])
152152
153153 class text (TConfig ):
154154 color = T .Trait ('black' ,mplT .ColorHandler ())
155155 usetex = T .false
156-
156+
157157 class latex (TConfig ):
158158 unicode = T .false
159159 preamble = T .ListStr ([])
160160 dvipnghack = T .false
161-
161+
162162 class mathtext (TConfig ):
163163 cal = T .Trait ('cursive' , mplT .FontconfigPatternHandler ())
164164 rm = T .Trait ('serif' , mplT .FontconfigPatternHandler ())
@@ -182,16 +182,16 @@ class axes(TConfig):
182182 'large' , 'x-large' , 'xx-large' , T .Float )
183183 labelcolor = T .Trait ('black' , mplT .ColorHandler ())
184184 axisbelow = T .false
185-
185+
186186 class formatter (TConfig ):
187187 limits = T .List (T .Float , [- 7 , 7 ], minlen = 2 , maxlen = 2 )
188-
188+
189189 class xticks (TConfig ):
190190 color = T .Trait ('black' , mplT .ColorHandler ())
191191 labelsize = T .Trait ('small' , 'xx-small' , 'x-small' , 'small' , 'medium' ,
192192 'large' , 'x-large' , 'xx-large' , T .Float )
193193 direction = T .Trait ('in' , 'out' )
194-
194+
195195 class major (TConfig ):
196196 size = T .Float (4 )
197197 pad = T .Float (4 )
@@ -205,7 +205,7 @@ class yticks(TConfig):
205205 labelsize = T .Trait ('small' , 'xx-small' , 'x-small' , 'small' , 'medium' ,
206206 'large' , 'x-large' , 'xx-large' , T .Float )
207207 direction = T .Trait ('in' , 'out' )
208-
208+
209209 class major (TConfig ):
210210 size = T .Float (4 )
211211 pad = T .Float (4 )
@@ -220,8 +220,8 @@ class grid(TConfig):
220220 linewidth = T .Float (0.5 )
221221
222222 class legend (TConfig ):
223- loc = T .Trait ('upper right' , 'best' , 'upper right' , 'upper left' ,
224- 'lower left' , 'lower right' , 'right' , 'center left' ,
223+ loc = T .Trait ('upper right' , 'best' , 'upper right' , 'upper left' ,
224+ 'lower left' , 'lower right' , 'right' , 'center left' ,
225225 'center right' , 'lower center' , 'upper center' , 'center' )
226226 isaxes = T .true
227227 numpoints = T .Int (3 )
@@ -264,26 +264,26 @@ class image(TConfig):
264264
265265 class contour (TConfig ):
266266 negative_linestyle = T .Trait ('dashed' , 'dashed' , 'solid' )
267-
267+
268268 class savefig (TConfig ):
269269 dpi = T .Float (100 )
270270 facecolor = T .Trait ('white' , mplT .ColorHandler ())
271271 edgecolor = T .Trait ('white' , mplT .ColorHandler ())
272272 orientation = T .Trait ('portrait' , 'portrait' , 'landscape' )
273-
273+
274274 class verbose (TConfig ):
275275 level = T .Trait ('silent' , 'silent' , 'helpful' , 'debug' , 'debug-annoying' )
276276 fileo = T .Trait ('sys.stdout' , 'sys.stdout' , T .File )
277277
278278
279279class RcParamsWrapper (dict ):
280-
280+
281281 """A backwards-compatible interface to a traited config object
282282 """
283-
283+
284284 def __init__ (self , tconfig ):
285285 self .tconfig = tconfig
286-
286+
287287 self .tconfig_map = {
288288 'backend' : (self .tconfig .backend , 'use' ),
289289 'numerix' : (self .tconfig , 'numerix' ),
@@ -337,7 +337,7 @@ def __init__(self, tconfig):
337337 'text.latex.unicode' : (self .tconfig .text .latex , 'unicode' ),
338338 'text.latex.preamble' : (self .tconfig .text .latex , 'preamble' ),
339339 'text.dvipnghack' : (self .tconfig .text .latex , 'dvipnghack' ),
340-
340+
341341 'mathtext.cal' : (self .tconfig .mathtext , 'cal' ),
342342 'mathtext.rm' : (self .tconfig .mathtext , 'rm' ),
343343 'mathtext.tt' : (self .tconfig .mathtext , 'tt' ),
@@ -455,7 +455,7 @@ def __getitem__(self, key):
455455
456456 def keys (self ):
457457 return self .tconfig_map .keys ()
458-
458+
459459 def has_key (self , val ):
460460 return self .tconfig_map .has_key (val )
461461
@@ -466,7 +466,7 @@ def update(self, arg, **kwargs):
466466 except AttributeError :
467467 for key , val in arg :
468468 self [key ] = val
469-
469+
470470 for key in kwargs :
471471 self [key ] = kwargs [key ]
472472
0 commit comments