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

Home » Public Forums » archive » Re: Anyone can explain this?
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: Anyone can explain this? [message #64185] Mon, 08 December 2008 17:49 Go to next message
xiao zhang is currently offline  xiao zhang
Messages: 81
Registered: June 2008
Member
On Dec 7, 5:45 pm, David Fanning <n...@dfanning.com> wrote:
> xiao writes:
>> Hi ~ guys. I have a question about the contour command.   When I call
>> it like this:
>> ...
>> It shows me the right color and I can change the color in the contour
>> command,  Why is that?  Any one got ideas?
>
> The contour command requires that you use index colors. Load your
> R, G, and B vectors into the color table, then set up C_COLOR like
> this:
>
>    Device, Get_Decomposed=theState, DECOMPOSED=0
>    TVLCT, r, g, b, 1
>    Map_Set, ...
>    CONTOUR, ...., C_COLORS=Indgen(64)+1B
>    Device, DECOMPOSED=theState
>
> 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.")

Thank you very much David~
Re: Anyone can explain this? [message #64194 is a reply to message #64185] Sun, 07 December 2008 15:45 Go to previous messageGo to next message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
xiao writes:

> Hi ~ guys. I have a question about the contour command. When I call
> it like this:
> ...
> It shows me the right color and I can change the color in the contour
> command, Why is that? Any one got ideas?

The contour command requires that you use index colors. Load your
R, G, and B vectors into the color table, then set up C_COLOR like
this:


Device, Get_Decomposed=theState, DECOMPOSED=0
TVLCT, r, g, b, 1
Map_Set, ...
CONTOUR, ...., C_COLORS=Indgen(64)+1B
Device, DECOMPOSED=theState

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.")
Re: Anyone can explain this? [message #64264 is a reply to message #64194] Wed, 10 December 2008 09:32 Go to previous message
xiao zhang is currently offline  xiao zhang
Messages: 81
Registered: June 2008
Member
On Dec 7, 5:45 pm, David Fanning <n...@dfanning.com> wrote:
> xiao writes:
>> Hi ~ guys. I have a question about the contour command.   When I call
>> it like this:
>> ...
>> It shows me the right color and I can change the color in the contour
>> command,  Why is that?  Any one got ideas?
>
> The contour command requires that you use index colors. Load your
> R, G, and B vectors into the color table, then set up C_COLOR like
> this:
>
>    Device, Get_Decomposed=theState, DECOMPOSED=0
>    TVLCT, r, g, b, 1
>    Map_Set, ...
>    CONTOUR, ...., C_COLORS=Indgen(64)+1B
>    Device, DECOMPOSED=theState
>
> 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.")

Sorry, David, But i have another question, I suddenly realized that my
map did not show the continent line. The continent line was erased by
the contour . But if I put the map_grid and map_continents after the
contour, it showed me the error :
-Current ploting device must have mapping coordinates..
I think i have used the overplot and noerase key word in contour
command. But it still does not shown.....

Thanks ~~~ :)


map_set,/grid, /continents,/CYLINDRICAL,limit=
[-31.6166,118.4641,-34.2542,121.6421],$
color=64,/noborder,ymargin=[15,5],/NOERASE

;map_grid, color=64, /device
;map_continents,/countries, /coasts, color=64, /device

contour,u3,color=64,title='U 0.1 m/s For Grid3 Init', /device,/
NOERASE,xrange=[0,76],$
/xstyle,xTICKINTERVAL=73,xTICKNAME=[118.4641,121.6421],$
yrange=[0,74],/ystyle,yTICKINTERVAL=73,yTICKNAME=
[-31.6166,-34.2542], $
C_COLORS=cn1,/cell_FILL,nLEVELS=48,ymargin=[15,5]
Contour, u3, Color=63,/Overplot,nLEVELS=48,/NOERASE, /device


map_grid, color=64, /device
map_continents,/countries, /coasts, color=64, /device
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Re: Error in the spinner control panel on Catalyst library
Next Topic: Anyone can explain this?

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

Current Time: Wed Oct 08 19:43:31 PDT 2025

Total time taken to generate the page: 0.00631 seconds