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 
Switch to threaded view of this topic Create a new topic Submit Reply
Re: switch colortable [message #31820] Thu, 22 August 2002 20:24 Go to next message
tom is currently offline  tom
Messages: 28
Registered: April 1995
Junior Member
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.

Tom


"David Fanning" <david@dfanning.com> д����Ϣ����
:MPG.17ce8849b6fe4f2e989973@news.frii.com...
> tom (tom2959@21cn.com) writes:
>
>> Some the colortables(loadct,0,1...) have colors vary from some
>> color(black,blue,...) to white linearly. But I hope the colortable
changing
>> from white to some color(black,...). Then when I plot contour, the
maximun
>> peaks can display clearly. How to do that then?
>
> Here is one way:
>
> TVLCT, r, g, b, /Get
> TVLCT, Reverse(r), Reverse(g), Reverse(b)
>
> Another way is to start XLOADCT, then grab the
> Stretch Top thingy and drag it all the way to
> the left, and drag the Stretch Bottom thingy
> all the way to the right. Hit the DONE button.
>
> 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
Re: switch colortable [message #31834 is a reply to message #31820] Thu, 22 August 2002 05:34 Go to previous messageGo to next message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
tom (tom2959@21cn.com) writes:

> Some the colortables(loadct,0,1...) have colors vary from some
> color(black,blue,...) to white linearly. But I hope the colortable changing
> from white to some color(black,...). Then when I plot contour, the maximun
> peaks can display clearly. How to do that then?

Here is one way:

TVLCT, r, g, b, /Get
TVLCT, Reverse(r), Reverse(g), Reverse(b)

Another way is to start XLOADCT, then grab the
Stretch Top thingy and drag it all the way to
the left, and drag the Stretch Bottom thingy
all the way to the right. Hit the DONE button.

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
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
  Switch to threaded view of this topic Create a new topic Submit Reply
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: Wed Oct 08 19:42:03 PDT 2025

Total time taken to generate the page: 0.00452 seconds