def apply_cmap(zs, cmap, vmin=None, vmax=None):
if vmin is None: vmin = np.min(zs)<EOL>if vmax is None: vmax = np.max(zs)<EOL>if pimms.is_str(cmap): cmap = matplotlib.cm.get_cmap(cmap)<EOL>return cmap((zs - vmin) / (vmax - vmin))<EOL>
apply_cmap(z, cmap) applies the given cmap to the values in z; if vmin and/or vmad are passed,
  they are used to scale z.