Jack Saba (jack@magus.stx.com) wrote the other day:
> The following code (run with IDL 5.0.2) produces a plot with one image
> in the UL, and three images overplotted in the UR quadrant. Anyone
> understand why MAP_SET does not seem to work in conjuction with
> !P.MULTI?
>
> !p.multi = [0,2,2]
> window,0,xsize=800,ysize=800
> ; xmin, ymin, xmax, ymax
> map_set, /continents, title='UL', /noerase
> map_set, /continents, title='UR', /noerase
> map_set, /continents, title=' LL', /noerase
> map_set, /continents, title=' LR', /noerase
> print,!p.multi
> end
>
> The code can be made to work of course by using the POSITION keyword
> rather than !P.MULTI, but it seems curious that the code above doesn't
> work.
And then I wrote some nonsense like this:
> 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).
My friend Andrew Cool at the DSTO in Adelaide, Australia
points out in the gentlest manner possible that I ought to
take my own advice and read the documentation before I jump
in with both feet. He suggests that the ADVANCE keyword
to MAP_SET might be just what we are looking for. Sure
enough, try this:
!p.multi = [0,2,2]
window,0,xsize=800,ysize=800
; xmin, ymin, xmax, ymax
map_set, /continents, title='UL', /advance
map_set, /continents, title='UR', /advance
map_set, /continents, title=' LL', /advance
map_set, /continents, title=' LR', /advance
END
But I am still left wondering, why ADVANCE?!
"Thanks, Andrew," he said sheepishly.
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/
|