Re: cgimage and color tables [message #79566] |
Mon, 12 March 2012 22:50 |
A J
Messages: 11 Registered: February 2012
|
Junior Member |
|
|
On Mar 13, 4:00 pm, David Fanning <n...@dfanning.com> wrote:
> A J writes:
>> I need to display a grid of values, numbered 1-5, each value having a
>> specific color. What I have been trying to do is something like this:
>
>>> color_code = ['grn6', 'dodger blue', 'royal blue', 'salmon', 'pink']
>
>>> cgimage, grid, /scale, bottom = 0, top = 4
>
>> I don't want to set a predefined color table becasue I want to use the
>> colors I have chosen above. I have failed in my attempts to create a
>> color table with just these 5 colors. So how do I get, say, value 3 to
>> use color_code[2] etc?
>
> Greetings from Hawaii. I'm not working. In fact, I'm suppose
> to be making dinner! :-)
>
> TVLCT, cgColor(color_code, /Triple), 0
> cgImage, grid, ....
>
> Cheers,
>
> David
>
> --
> David Fanning, Ph.D.
> Fanning Software Consulting, Inc.
> Coyote's Guide to IDL Programming:http://www.dfanning.com/
> Sepore ma de ni thue. ("Perhaps thos speakest truth.")
Thankyou! Have a beer with your dinner, sir!
|
|
|
Re: cgimage and color tables [message #79567 is a reply to message #79566] |
Mon, 12 March 2012 22:00  |
David Fanning
Messages: 11724 Registered: August 2001
|
Senior Member |
|
|
A J writes:
> I need to display a grid of values, numbered 1-5, each value having a
> specific color. What I have been trying to do is something like this:
>
>> color_code = ['grn6', 'dodger blue', 'royal blue', 'salmon', 'pink']
>
>> cgimage, grid, /scale, bottom = 0, top = 4
>
> I don't want to set a predefined color table becasue I want to use the
> colors I have chosen above. I have failed in my attempts to create a
> color table with just these 5 colors. So how do I get, say, value 3 to
> use color_code[2] etc?
Greetings from Hawaii. I'm not working. In fact, I'm suppose
to be making dinner! :-)
TVLCT, cgColor(color_code, /Triple), 0
cgImage, grid, ....
Cheers,
David
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Sepore ma de ni thue. ("Perhaps thos speakest truth.")
|
|
|