X
PrevPrev Go to previous topic
NextNext Go to next topic
Last Post 14 Oct 2005 05:49 PM by  anon
A question about generating colorbar
 0 Replies
Sort:
You are not authorized to post a reply.
Author Messages

anon



New Member


Posts:
New Member


--
14 Oct 2005 05:49 PM
    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.
    You are not authorized to post a reply.