comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Re: cgimage and color tables
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
Re: cgimage and color tables [message #79566] Mon, 12 March 2012 22:50
A J is currently offline  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 Go to previous message
David Fanning is currently offline  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.")
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Re: IDL routines dependencies map maker
Next Topic: How to buy a full IDL version?

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Wed Oct 08 20:10:03 PDT 2025

Total time taken to generate the page: 0.03295 seconds