def scale_factory(scale, axis, **kwargs):
 scale = scale.lower()
 if (scale is None):
  scale = u'linear'
 if (scale not in _scale_mapping):
  raise ValueError((u"Unknown scale type '%s'" % scale))
 return _scale_mapping[scale](axis, **kwargs)

def scale_factory ( scale , axis , ** kwargs ) : scale = scale . lower ( ) if ( scale is None ) : scale = u'linear' if ( scale not in _scale_mapping ) : raise ValueError ( ( u"Unknown scale type '%s'" % scale ) ) return _scale_mapping [ scale ] ( axis , ** kwargs )
return a scale class by name .