def _generate_cmap(name, lutsize):
 spec = datad[name]
 if (u'red' in spec):
  return colors.LinearSegmentedColormap(name, spec, lutsize)
 elif (u'listed' in spec):
  return colors.ListedColormap(spec[u'listed'], name)
 else:
  return colors.LinearSegmentedColormap.from_list(name, spec, lutsize)

def _generate_cmap ( name , lutsize ) : spec = datad [ name ] if ( u'red' in spec ) : return colors . LinearSegmentedColormap ( name , spec , lutsize ) elif ( u'listed' in spec ) : return colors . ListedColormap ( spec [ u'listed' ] , name ) else : return colors . LinearSegmentedColormap . from_list ( name , spec , lutsize )
generates the requested cmap from its *name* .