#!/bin/csh
########## Example A5
################ From the beginning to Step 3 were created by running
## topoimag. The only change needed is to add -K in Step 3.
## See Example A4 for info regarding topoimag
## Note: Nothing should exist before #!/bin/csh above, including blank lines
#### Step 1: rm tmp.ps
/bin/rm tmp.ps tmp.grd tmp.int tmp.cpt
set lon1 = -130.00
set lon2 = -90.00
set lat1 = 20.00
set lat2 = 50.00
set a = 10.0
##### Step 2: make a basemap, prepare the data, and make an image map
psbasemap -R$lon1/$lon2/$lat1/$lat2 -JM5 -Bf1a$a \
-V -P -K -X1.5 -Y5 >tmp.ps
grdcut /home/sgao/Dbase/topo2min/topo2min.grd \
-Gtmp.grd -R -V
grdgradient tmp.grd -A0 -Gtmp.int -Nt -V
grd2cpt tmp.grd -Ccool -Z >tmp.cpt
grdimage tmp.grd -Itmp.int -Ctmp.cpt -R -JM -O -K -V >>tmp.ps
##### Step 3
pscoast -R -JM -Df -W2 -Na/1 -O -K -V >>tmp.ps
/bin/rm tmp.grd tmp.int tmp.cpt
echo "Your output postscript file is called tmp.ps "
########## End of the codes created by topoimag. Adding more features below
## See Steps 4-8 in Example 3 for information
## regarding Steps 4-8 below.
### Step 4: plot 1 red square in Kansas and another 1 in Nebraska
psxy -R -JM -O -K -Ss0.2 -G255/0/0 <>tmp.ps
-100 39
-100 42
END
### Step 5: write the word Texas and a big title
pstext -R -JM -O -K -N <>tmp.ps
-100 32 15 0 5 MC Texas
END
### Step 6: add a thick green great-circle arc line connecting two points
psxy -R -JM -O -K -W15/0/255/0 <>tmp.ps
-110 45
-80 40
END
### Step 7: plot a blue rectangle (e.g., my area of study)
psxy -R -JM -K -O -W9/0/0/255 <>tmp.ps
-108 40
-108 38
-103 38
-103 40
-108 40
END
### Step 8: Plot data in my.data as red triangles
awk '{print $2, $3}' my.data | \
psxy -R -JM -O -St0.3 -G255/0/0 >>tmp.ps