colorize_subsets

glue.core.util.colorize_subsets(subsets, cmap, lo=0, hi=1)[source]

Re-color a list of subsets according to a colormap.

The colormap will be sampled at len(subsets) even intervals between lo and hi. The color at the ith interval will be applied to subsets[i]

Parameters
subsetslist

List of subsets

cmapmatplotlib.colors.Colormap

Matplotlib colormap instance

lofloat, optional

Start location in colormap. 0-1. Defaults to 0

hifloat, optional

End location in colormap. 0-1. Defaults to 1