docs: def apply_cmap(zs, cmap, vmin=None, vmax=None):
      '''
      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.
      '''
      if vmin is None: vmin = np.min(zs)
      if vmax is None: vmax = np.max(zs)
      if pimms.is_str(cmap): cmap = matplotlib.cm.get_cmap(cmap)
      return cmap((zs - vmin) / (vmax - vmin))