@@ -244,6 +244,13 @@ def __call__(self, s):
244
244
raise ValueError ('Could not convert all entries to ints' )
245
245
246
246
247
+ def validate_color_or_inherit (s ):
248
+ 'return a valid color arg'
249
+ if s == 'inherit' :
250
+ return s
251
+ return validate_color (s )
252
+
253
+
247
254
def validate_color (s ):
248
255
'return a valid color arg'
249
256
try :
@@ -254,6 +261,7 @@ def validate_color(s):
254
261
if is_color_like (s ):
255
262
return s
256
263
stmp = '#' + s
264
+
257
265
if is_color_like (stmp ):
258
266
return stmp
259
267
# If it is still valid, it must be a tuple.
@@ -606,7 +614,7 @@ def __call__(self, s):
606
614
'image.lut' : [256 , validate_int ], # lookup table
607
615
'image.origin' : ['upper' , six .text_type ], # lookup table
608
616
'image.resample' : [False , validate_bool ],
609
- # Specify whether vector graphics backends will combine all images on a
617
+ # Specify whether vector graphics backends will combine all images on a
610
618
# set of axes into a single composite image
611
619
'image.composite_image' : [True , validate_bool ],
612
620
@@ -696,6 +704,8 @@ def __call__(self, s):
696
704
# the relative size of legend markers vs. original
697
705
'legend.markerscale' : [1.0 , validate_float ],
698
706
'legend.shadow' : [False , validate_bool ],
707
+ 'legend.facecolor' : ['inherit' , validate_color_or_inherit ],
708
+ 'legend.edgecolor' : ['inherit' , validate_color_or_inherit ],
699
709
700
710
## tick properties
701
711
'xtick.major.size' : [4 , validate_float ], # major xtick size in points
0 commit comments