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

Home » Public Forums » archive » Re: Inverting colourtable
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: Inverting colourtable [message #25657] Thu, 05 July 2001 07:21 Go to previous message
david[2] is currently offline  david[2]
Messages: 100
Registered: June 2001
Senior Member
Simon de Vet writes:

> Will this still work for postscript output? I'm not doing any of my
> visualization on screen.

Sigh... Probably not.

I'm guessing you don't really know what color indices
you are using to draw your filled contour colors in.
If you did (and you should), you probably wouldn't
be asking this question, since the answer would be
so simple: reverse the numbers!

I'd leave the color table alone (it will be decades
before color is needed on computers anyway) and do
something like this. Suppose you have 20 contour
levels you intend to visualize:

nsteps = 20
LOADCT, 0, NColors=20, Bottom=1
step = (Max(data) - Min(data)) / nsteps
nlevels = Indgen(nsteps) * step + Min(data)
Contour, data, Levels=nlevels, /Fill, $
C_Colors=Reverse(Indgen(nsteps)+1)

That will work *everywhere*. :-)

Cheers,

David

--
David Fanning, Ph.D.
Fanning Software Consulting
Phone: 970-221-0438 E-Mail: davidf@dfanning.com
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Toll-Free IDL Book Orders: 1-888-461-0155
[Message index]
 
Read Message
Read Message
Read Message
Previous Topic: Warping surfaces to match control points
Next Topic: set_shading question

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

Current Time: Wed Oct 08 18:55:58 PDT 2025

Total time taken to generate the page: 0.00456 seconds