GMT example - Topographic Map


#Plot Border Around Map
pstext -R-108.1/-103.5/34/43.1 -Jl-106.25/39/33/44.5/1:1000000 -X1.0 -K <<END> cdtopo.ps
-105.7 43.01 25 0 1 2 Topographic Map for CD-ROM 1999
END
#Generate color image
grdimage cdrom30.grd -Ccdrom1.cpt -R-108/-103.75/34.25/43 \
\-Jl-106.25/39/33/44.5/1:1000000 -X1.0 -O -K >> cdtopo.ps
#Put coastlines, national boundaries, rivers and scales and grid
pscoast -R -Jl -Dh -B0.5 -Ia -Na/5/0/205/96 -Lf-104.5/41/39/100 -S168/255/255 \
\-W3 -K -O >> cdtopo.ps
#Bring in coord files
psxy -: cdllee99.txt -R -Jl -P -Sc0.1/255/0/0 -O -K >> cdtopo.ps
psxy -: cdshlle99.txt -R -Jl -P -Sa0.2/0/205/205 -G0/205/205 -O -K >> cdtopo.ps
Begin plotting legend
psxy -Jx1.0 -R0/6/0/15 -G255/255/255 -L -W10 -Y0.1 -K -O <<END>> cdtopo.ps
0 0
0 5
2.80 5
2.80 0
0 0
END
psxy -Jx -R -L -W3 -K -O <<END>> cdtopo.ps
0.1 0.1
0.1 4.9
2.7 4.9
2.7 0.1
0.1 0.1
END
#Plot scale
psscale -Ccdrom1.cpt -D0.8/2.5/4.0/0.4 -I -O -K >> cdtopo.ps
#Plot globe in corner
pscoast -R0/180/-90/90 -JA-110/32/1.5 -B30g30 -Dc -A1000 -G0 -S255/255/255 -X4.5 -O -K >> cdtopo.ps
Plot yellow area on globe
psxy -JA -R -G255/255/0 -L -O <<END>> cdtopo.ps
-110 32
-106 32
-106 49
-110 49
-110 32
END
# Start ghostview
ghostview cdtopo.ps
#
rm -i cdtopo.ps