def __init__(self):
color_positions = np.linspace(0.0, 1.0, num=len(self.COLORS))
self.colormap = pg.ColorMap(color_positions, self.COLORS.astype(int))
self.cmap_normed = pg.ColorMap(color_positions, self.COLORS_INV / 255)
# get the LookUpTable (LUT), first two params should match the position
# scale extremes passed to ColorMap().
# Return an RGB(A) lookup table (ndarray). Insert starting and stopping
# value and the number of points in the returned lookup table:
self.lut = self.colormap.getLookupTable(0, 1, 2000)
评论列表
文章目录