Re: Color Bar without using color table [message #52074] |
Sun, 31 December 2006 07:21 |
David Fanning
Messages: 11724 Registered: August 2001
|
Senior Member |
|
|
nagne writes:
> I have a function, "time_to_color(t,min,max)", which converts a time to
> a color RGB number(0 to 16.7 million), where "min <= t <= max".
> With "device,decomposed=1", I could plot with lots of colors. For
> example,
>
> device, decomposed=1
> x=findgen(1000)
> plot,x,x,/nodata
> plots,x,x,color=time_to_color(x)
>
> But when I was trying to make a color bar with the plot, I was stuck. I
> am just wondering how I can produce a reasonable color bar without
> referring to 8 bit color tables.
A color bar is just a visual record of the colors used
in a graphic display, along with an explanation of the
meaning of those colors. Presumably you know which colors
you used, and you know what those colors mean. Just make
a color bar out of that knowledge. The usual tools are
PLOTS, POLYFILL, and XYOUTS. :-)
Cheers,
David
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Sepore ma de ni thui. ("Perhaps thou speakest truth.")
|
|
|