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

Home » Public Forums » archive » Re: switch colortable
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: switch colortable [message #31918 is a reply to message #31820] Thu, 22 August 2002 20:48 Go to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
tom (tom2959@21cn.com) writes:

> Thanks. A very simple contour plot is as following:
>
> levels=12
> LoadCT, 0, Bottom=1,NColors=levels
> ; TVLCT, r, g, b, /Get
> ;TVLCT, Reverse(r), Reverse(g), Reverse(b)
>
> maxp=max(peak,/nan) & minp=min(peak,/nan)
> step = (Maxp - Minp) / levels
> userLevels = IndGen(levels) * step + Minp
> ; Draw a colorbar.
> Contour,
> peak,x,y,/cell_fill,Background=white,C_Colors=Indgen(levels) +1,Levels=userLe
> vels
>
> I hope the color at maximum is black. Your suggestion sems does not help.

Ah, well, you are changing the problem on me. :-)
Try this:

levels=12
LoadCT, 0, Bottom=1,NColors=levels
TVLCT, r, g, b, /Get
TVLCT, Reverse(r[1:12]), Reverse(g[1:12]), Reverse(b[1:12]), 1

Cheers,

David
--
David W. Fanning, Ph.D.
Fanning Software Consulting, Inc.
Phone: 970-221-0438, E-mail: david@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: Re: How to use max() to plot where in the plot max is located ?
Next Topic: Widget exclusive buttons

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

Current Time: Mon Oct 27 03:26:02 PDT 2025

Total time taken to generate the page: 0.02921 seconds