[GRASSLIST:5636] Linking Monitors script
John Gillette
JGillette at rfmd.com
Fri Feb 21 15:50:45 EST 2003
try this:
Select and then Erase x1 and then display what ever you want there.
Select x0 and erase and display other info there.
Run this script to either pan or zoom in x0. After finishing
the pan or zoom x1 will redraw it's contents at the same region
thereby "following" what ever is done in x0.
The disadvantage is that you can only do 1 pan or zoom at a time,
i.e. not interactively.
usage:
script_name z <- does zoom instead of pan
script_name
zooming and panning in x0. x0 is selected at exit.
Does this help?
John
------------------
#!/bin/sh
d.mon select=x1
monitor1=`d.save -o`
d.mon select=x0
if [ "$1" = "z" ]
then
d.zoom
else
d.pan
fi
region=`g.region -g`
d.mon select=x1
d.erase
g.region $region
eval "$monitor1"
d.mon select=x0
exit 0
More information about the grass-user
mailing list