xoa.color.crop_cmap

Contents

xoa.color.crop_cmap#

xoa.color.crop_cmap(cmapin, vmin, vmax, pivot=0)[source]#

Crop a colormap so that it is centered around pivot

This is a wrapper for cmocean.tools.crop().

Parameters:
  • cmapin (colormap) – Compatible with matplotlib.pyplot.get_cmap().

  • vmin (float) – Min data value

  • vmax (float) – Max data value

  • pivot (float) – The colormap will be centered on this value. Should be lower than vmax and greater than vmin.