I use the following code to generate a gray color bar:
cmap = IndGen(256)
cmap = cmap+256L*(cmap+256L*cmap)
x = [0,1]
y = Make_Array(2, /FLOAT)
y[0] = LThreshold
y[1] = HThreshold
bar = Make_Array(2, 2, /FLOAT)
bar[0,*] = y
bar[1,*] = y
Contour, bar, x, y, /CELL_FILL,NLEVELS=256, C_COLORS=cmap
However, the gray on this color bar doesn't change from "pure" white to "pure" black, but from a lighter gray to a darker gray, which also change with the values of array y.
Is there a better way to build a color bar as I expect?
Thank you.
|