I am running GMT3.0 on an Linux-Alpha-Box. Things run quite nicely
except for some weird offset problems: Sometimes, a displayed field is
shifted with respect to an overlayed map by half the grid spacing. This
is usually hardly noticable (but nevertheless wrong) and sometimes makes
the plot useless. I have noticed this with grdview and with grdimage.
But the problem could also be caused by my use of xyz2grd. Below is a
simple example script that visualizes what I am trying to convey. Only
the top left and the bottom right graphs are correct while the other two
are shifted erroneously.
Is there a mistake in my test script? Can the problem be reproduced on
other platforms. Does anybody know of a fix for this problem, is it maybe
fixed in GMT3.1?
Help is much appreciated.
Lars
#!/bin/csh
cat >! test.dat<<eof
1
2
3
4
5
6
7
8
9
eof
#
#-- grid line registration --#
#
xyz2grd -Gtest.grd -I1/1 -R1/3/1/3 -Z test.dat
makecpt -C1 -S9c -M4.5 >! test.cpt
grdimage test.grd -X1 -Y7 -R1/3/1/3 -Bg1a1 -JX2.5/2.5 -Ctest.cpt -K >! test1.ps
grdimage test.grd -X4 -R0/5/0/5 -Bg1a1 -JX2.5/2.5 -Ctest.cpt -O -K >> test1.ps
grdimage test.grd -X-4 -Y-4 -R1.5/2.5/1.5/2.5 -Bg.5a.5 -JX2.5/2.5 -Ctest.cpt -O -K >> test1.ps
grdimage test.grd -X4 -R1/2/1/2 -Bg.5a.5 -JX2.5/2.5 -Ctest.cpt -O >> test1.ps
#
#-- pixel registration --#
#
xyz2grd -Gtest.grd -I1/1 -R0/3/0/3 -F -Z test.dat
makecpt -C1 -S9c -M4.5 >! test.cpt
grdimage test.grd -X1 -Y7 -R0/3/0/3 -Bg1a1 -JX2.5/2.5 -Ctest.cpt -K >! test2.ps
grdimage test.grd -X4 -R0/5/0/5 -Bg1a1 -JX2.5/2.5 -Ctest.cpt -O -K >> test2.ps
grdimage test.grd -X-4 -Y-4 -R1.5/2.5/1.5/2.5 -Bg.5a.5 -JX2.5/2.5 -Ctest.cpt -O -K >> test2.ps
grdimage test.grd -X4 -R1/2/1/2 -Bg.5a.5 -JX2.5/2.5 -Ctest.cpt -O >> test2.ps