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

Home » Public Forums » archive » Re: color tables and cgcolorbar
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: color tables and cgcolorbar [message #83109] Wed, 06 February 2013 15:20
Jeremy Bailin is currently offline  Jeremy Bailin
Messages: 618
Registered: April 2008
Senior Member
On 2/6/13 3:25 PM, David Fanning wrote:
> Jeremy Bailin writes:
>
>> I want to display a color bar using cgcolorbar where the first N colors
>> are taken from color table 33 and the rest are black. Does anyone have a
>> quick 2-liner?
>
> n = 36
> TVLCT, BytArr(256), BytArr(256), BytArr(256)
> cgLoadCT, 33, NColors=n
> cgColorBar
>
> Cheers,
>
> David

That's not quite what I want - I actually only want the bottom N colors
of the color table. But it put me on the right track! I added in
CLIP=[0,n-1] to the cgloadct call, and it looks good.

Thanks,
-Jeremy.
Re: color tables and cgcolorbar [message #83110 is a reply to message #83109] Wed, 06 February 2013 13:25 Go to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
Jeremy Bailin writes:

> I want to display a color bar using cgcolorbar where the first N colors
> are taken from color table 33 and the rest are black. Does anyone have a
> quick 2-liner?

n = 36
TVLCT, BytArr(256), BytArr(256), BytArr(256)
cgLoadCT, 33, NColors=n
cgColorBar

Cheers,

David


--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.idlcoyote.com/
Sepore ma de ni thue. ("Perhaps thou speakest truth.")
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: color tables and cgcolorbar
Next Topic: Re: Interupting a running procedure using Widget event interupts.

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

Current Time: Wed Oct 08 13:54:43 PDT 2025

Total time taken to generate the page: 0.00556 seconds