def _setup_styles(conditions, style_dict, style, default):
 tags = set([tag for cond in conditions for tag in cond.split('/')])
 msg = "Can't map between conditions and the provided {0}. Make sure you have provided keys in the format of '/'-separated tags, and that these correspond to '/'-separated tags for the condition names (e.g., conditions like 'Visual/Right', and styles like 'colors=dict(Visual='red'))'. The offending tag was '{1}'."
 for key in style_dict:
  for tag in key.split('/'):
   if (tag not in tags):
    raise ValueError(msg.format(style, tag))
 condition_warning = ('Condition {0} could not be mapped to a ' + style)
 style_warning = '. Using the default of {0}.'.format(default)
 for condition in conditions:
  if (condition not in style_dict):
   if ('/' not in condition):
    warn((condition_warning.format(condition) + style_warning))
    style_dict[condition] = default
   for style_ in style_dict:
    if (style_ in condition.split('/')):
     style_dict[condition] = style_dict[style_]
     break
 return style_dict

def _setup_styles ( conditions , style_dict , style , default ) : tags = set ( [ tag for cond in conditions for tag in cond . split ( '/' ) ] ) msg = "Can't map between conditions and the provided {0}. Make sure you have provided keys in the format of '/'-separated tags, and that these correspond to '/'-separated tags for the condition names (e.g., conditions like 'Visual/Right', and styles like 'colors=dict(Visual='red'))'. The offending tag was '{1}'." for key in style_dict : for tag in key . split ( '/' ) : if ( tag not in tags ) : raise ValueError ( msg . format ( style , tag ) ) condition_warning = ( 'Condition {0} could not be mapped to a ' + style ) style_warning = '. Using the default of {0}.' . format ( default ) for condition in conditions : if ( condition not in style_dict ) : if ( '/' not in condition ) : warn ( ( condition_warning . format ( condition ) + style_warning ) ) style_dict [ condition ] = default for style_ in style_dict : if ( style_ in condition . split ( '/' ) ) : style_dict [ condition ] = style_dict [ style_ ] break return style_dict
set linestyles and colors for plot_compare_evokeds .