[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Map graphics
Ben Tupper wrote:
> I have a widget routine which displays a map (using Map_Set, etc.)
> with vector overlays. The routine user can call another widget
> that displays some direct graphics plots using !P.Multi = [0,2,2].
> When the user returns to the main routine, plotting the earlier vector
> overlays on the map shows that the plotting parameters have changed.
> All of the vectors get squished toward the center of the graphic.
> Before starting the second routine, I have saved a copy of !P.Multi,
> !X.S, !Y.S, and !Map. Each of these is restored after the second
> routine is closed. Short of calling Map_Set again, is there a way I
> can save the mapping/plotting parameters and restore them later?
Ah the joy of global variables....
One way to handle this problem is to 'refresh' the map projection by
calling MAP_SET with the /NOERASE and /NOBORDER keywords to re-create
the map projection whenever you select the graphics window which
contains the map plot.
If you decide to go the system variable route, I would save !X, !Y, !Z,
!P, and !MAP for each graphics window. I use this technique in my IDL
frame tools which allow you to create a map projection in one frame, a
multiple panel plot in the next frame, and then switch between them with