@@ -275,18 +275,18 @@ def validate_maskedarray(v):
275275
276276
277277class validate_nseq_float (object ):
278- def __init__ (self , n ):
278+ def __init__ (self , n = None ):
279279 self .n = n
280280
281281 def __call__ (self , s ):
282282 """return a seq of n floats or raise"""
283283 if isinstance (s , six .string_types ):
284- s = s .split (',' )
284+ s = [ x . strip () for x in s .split (',' )]
285285 err_msg = _str_err_msg
286286 else :
287287 err_msg = _seq_err_msg
288288
289- if len (s ) != self .n :
289+ if self . n is not None and len (s ) != self .n :
290290 raise ValueError (err_msg .format (n = self .n , num = len (s ), s = s ))
291291
292292 try :
@@ -296,18 +296,18 @@ def __call__(self, s):
296296
297297
298298class validate_nseq_int (object ):
299- def __init__ (self , n ):
299+ def __init__ (self , n = None ):
300300 self .n = n
301301
302302 def __call__ (self , s ):
303303 """return a seq of n ints or raise"""
304304 if isinstance (s , six .string_types ):
305- s = s .split (',' )
305+ s = [ x . strip () for x in s .split (',' )]
306306 err_msg = _str_err_msg
307307 else :
308308 err_msg = _seq_err_msg
309309
310- if len (s ) != self .n :
310+ if self . n is not None and len (s ) != self .n :
311311 raise ValueError (err_msg .format (n = self .n , num = len (s ), s = s ))
312312
313313 try :
@@ -836,6 +836,9 @@ def validate_hist_bins(s):
836836 'lines.solid_joinstyle' : ['round' , validate_joinstyle ],
837837 'lines.dash_capstyle' : ['butt' , validate_capstyle ],
838838 'lines.solid_capstyle' : ['projecting' , validate_capstyle ],
839+ 'lines.dashed_pattern' : [[2.8 , 1.2 ], validate_nseq_float ()],
840+ 'lines.dashdot_pattern' : [[4.8 , 1.2 , 0.8 , 1.2 ], validate_nseq_float ()],
841+ 'lines.dotted_pattern' : [[1.2 , 0.6 ], validate_nseq_float ()],
839842
840843 # marker props
841844 'markers.fillstyle' : ['full' , validate_fillstyle ],
@@ -992,14 +995,15 @@ def validate_hist_bins(s):
992995 'axes.formatter.use_mathtext' : [False , validate_bool ],
993996 'axes.formatter.useoffset' : [True , validate_bool ],
994997 'axes.unicode_minus' : [True , validate_bool ],
995- 'axes.color_cycle' : [['b' , 'g' , 'r' , 'c' , 'm' , 'y' , 'k' ],
996- deprecate_axes_colorcycle ], # cycle of plot
997- # line colors
998- # This entry can be either a cycler object or a
998+ 'axes.prop_cycle' : [
999+ ccycler ('color' ,
1000+ ['#1f77b4' , '#ff7f0e' , '#2ca02c' , '#d62728' ,
1001+ '#9467bd' , '#8c564b' , '#e377c2' , '#7f7f7f' ,
1002+ '#bcbd22' , '#17becf' ]),
1003+ validate_cycler ], # This entry can be either a cycler object or a
9991004 # string repr of a cycler-object, which gets eval()'ed
10001005 # to create the object.
1001- 'axes.prop_cycle' : [ccycler ('color' , 'bgrcmyk' ),
1002- validate_cycler ],
1006+
10031007 # If 'data', axes limits are set close to the data.
10041008 # If 'round_numbers' axes limits are set to the nearest round numbers.
10051009 'axes.autolimit_mode' : [
0 commit comments