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

Home » Public Forums » archive » New Color Table Loading Tool
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
New Color Table Loading Tool [message #56476] Tue, 30 October 2007 10:19
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
Folks,

After nearly 20 years of being vexed and annoyed by LOADCT
I finally, today, created a new color table loading tool
that works the way I want it to. It is named, appropriately
enough, CTLOAD. (I can't tell you which straw broke the
camel's back, or why today. Life is a mystery.) You can find
it here:

http://www.dfanning.com/programs/ctload.pro

This is a drop-in replacement for LOADCT, so you can use
all the normal keywords, etc. But, in addition, a REVERSE
keyword is supplied so that the color table can be reversed
before it is loaded. Also, a CLIP keyword allows the user
to clip the normal color table vectors at either end of the
original color vector, prior to loading.

I find the latter functionality particularly useful when
I want a reduced number of colors (perhaps for contouring),
but I want to eliminate the black and white colors so
commonly found at either end of most IDL color tables.

For example, suppose I wanted to create a color table
that displayed negative values with red-temperature
values and positive values with blue-temperature
values, and I would like the red-temperature
values to be reversed in the color table (so
dark colors adjoin in the color table and indicate
values near zero). I can do this:

CTLoad, 0
CTLoad, 3, /REVERSE, CLIP=[32,240], BOTTOM=1, NCOLORS=10
CTLoad, 1, CLIP=[64, 245], BOTTOM=11, NCOLORS=10
Colorbar, NCOLORS=20, BOTTOM=1, DIV=10, RANGE=[-10,10]
CINDEX

But, the nicest thing about CTLOAD is that *all* color table
loading is handled silently. Yes!!

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.")
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: RGB Color reconstruction
Next Topic: Re: RGB Color reconstruction

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

Current Time: Fri Oct 10 06:05:08 PDT 2025

Total time taken to generate the page: 1.27822 seconds