how can I delete the grid lines, which are going out from the map?
I attached the gmt script and the resulted map, as shown below.
rem xyz2grd data.txt -Gtest.grd -R129/146/30/46 -I1m -V
surface data.txt -Gtest.grd -R129/146/30/46 -I1m -V
grd2cpt test.grd -Crainbow -L-3/18 -S0.5/18/0.5 > colors.cpt
rem nearneighbor data.txt -Gtest.grd -R129/146/30/46 -I1m -V -S100k
psscale -Ccolors.cpt -D15/5/7/0.5 -B5:FREQUENCY:/:Hz: -K > testmap.ps
grdimage test.grd -Jm0.3i -Ccolors.cpt -P -K -O >> testmap.ps
pscoast -Jm0.3i -R -Ba5f0.g0./a5f0.g0.WSen -Df -A1 -W1p -P -V -O -Swhite >> testmap.ps