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

Home » Public Forums » archive » Re: Multiple cgMap Plots in a cgWindow
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: Multiple cgMap Plots in a cgWindow [message #83546 is a reply to message #83544] Mon, 11 March 2013 10:39 Go to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
Sean Elvidge writes:

> I was wondering if anyone could correct what I am doing wrong here. I am trying to plot multiple maps on a single plot. Usually (in an 'ordinary' IDL window) the following works (as a simple example):
>
> !P.Multi=[0,2,1]
> Map_Set,/Mercator,/Continents,/Advance
> Map_Set,/Mercator,/Continents,/Advance
>
> So now I would like to replicate the above, in a cgWindow. This is what I've tried:
>
> cgWindow,WMulti=[0,2,1]
> cgMap_Set,/Mercator,/Continents,/Advance,/AddCmd
> cgMap_Set,/Mercator,/Continents,/Advance,/AddCmd
>
>
> But this does not work, and instead just plots a full sized map.
>
> Any ideas?

You are not doing anything wrong. You are just not doing what I do. ;-)

There is a bug in your version of cgMap_Set. I simply forgot to check
the status of !P.Multi before I plunged in to set a Position for the map
projection. You can find an updated version here:

http://www.idlcoyote.com/programs/cgmap_set.pro

That said, using !P.Multi with Map_Set and Advance is a little
problematic, because Map_Set has apparently been hardwired pretty well
to prefer black backgrounds and it will use a black background even when
you might prefer something else!

If a black background is what you want, you should use cgMap_Set like
this:

cgWindow,WMulti=[0,2,1]
cgControl, Execute=0
cgMap_Set,/Mercator,/Continents,/Advance,/AddCmd,Color='whit e'
cgMap_Set,/Mercator,/Continents,/Advance,/AddCmd
cgControl, Execute=1

If you prefer white backgrounds, as I do, you should use cgMap_Set like
this:

cgWindow,WMulti=[0,2,1]
cgControl, Execute=0
cgMap_Set,/Mercator,/Continents,/AddCmd
cgMap_Set,/Mercator,/Continents,/AddCmd, /NoErase
cgControl, Execute=1

Cheers,

David


--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.idlcoyote.com/
Sepore ma de ni thue. ("Perhaps thou speakest truth.")
[Message index]
 
Read Message
Read Message
Previous Topic: Full-Disk Orthographic to Cylindrical Projection
Next Topic: Broad Peak Search Algorithm

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

Current Time: Fri Oct 10 06:46:53 PDT 2025

Total time taken to generate the page: 1.08995 seconds