Re: MAP_SET and !P.MULTI? [message #11306] |
Thu, 26 March 1998 00:00  |
Bob Yantosca
Messages: 6 Registered: March 1998
|
Junior Member |
|
|
> It is curious and certainly looks like a bug. The problem is
> that !P.Multi[0] is not getting updated properly (among
> several other curiosities). Rather than using the Position keyword,
> I fixed the code by doing this:
>
> !p.multi = [0,2,2]
> window,0,xsize=800,ysize=800
> ; xmin, ymin, xmax, ymax
> map_set, /continents, title='UL', /noerase
> !P.Multi[0] = 3
> map_set, /continents, title='UR', /noerase
> !P.Multi[0] = 2
> map_set, /continents, title=' LL', /noerase
> !P.Multi[0] = 1
> map_set, /continents, title=' LR', /noerase
> print,!p.multi
> end
>
> I don't know why the NoErase is still needed, except that
> something else is clearly not working correctly.
>
> Cheers,
>
> David
> -----------------------------------------------------------
> David Fanning, Ph.D.
> Fanning Software Consulting
> E-Mail: davidf@dfanning.com
> Phone: 970-221-0438
> Coyote's Guide to IDL Programming: http://www.dfanning.com/
>
>
For some reason, MAP_SET has never really advanced correctly
according to !P.MULTI (even in version 3.6 and 4.1).
What I've done to combat against this is the following
set advance keyword = 0 if !P.MULTI(0) = 0
= 1 otherwise
as is illustrated in the test program below:
=======================
pro testnew
; prints 4 maps in the UL, UR, LL, LR positions
!p.multi = [0, 2, 2, 0, 0]
for I = 0, 3 do begin
if (!P.MULTI(0) eq 0) then advance = 0 else advance = 1
map_set, 0, 0, 0, /grid, /cont, advance=advance
endfor
end
===============
Regards,
Bob Y.
|
|
|