[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Inverting colourtable
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, $
That will work *everywhere*. :-)
David Fanning, Ph.D.
Fanning Software Consulting
Phone: 970-221-0438 E-Mail: firstname.lastname@example.org
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Toll-Free IDL Book Orders: 1-888-461-0155