#!/bin/csh -f

rm -f ./.gmtcommand
rm -f ./.gmtdefaults

set OPTION="-Jm40.0 -R130.15/130.55/31.80/32.13 -B10mNseW"

gmtset ANOT_FONT_SIZE 15 DEGREE_FORMAT 3

psbasemap ${OPTION} -X3 -Y5 -P -K >! map.ps

pscoast -Jm -R -B -Lf130.45/31.85/31.85/10 -S200 -Df -W1 -P -O -K >>map.ps

# plot aftershocks
psxy -Jm -R -B -Sc0.1 -G180 -P -O -K <lon_lat.txt >>map.ps

# plot star
psxy -Jm -R -B -Sa -G0 -P -O -K <<END >>map.ps
130.37997   31.96959   0.3
END

# plot diamond
psxy -Jm -R -B -Sd -G0 -P -O -K <<END >>map.ps
130.33528   31.93846   0.3
END

# draw line 
psxy -Jm -R -B -W3 -P -O -K <<END >>map.ps
130.37033   32.02033
130.37997   31.96959
END

# draw line 
psxy -Jm -R -B -W3 -P -O -K <<END >>map.ps
130.28167   31.92833
130.33528   31.93846
END

# plot station
psxy -Jm -R -B -St -G0 -P -O -K <<END >>map.ps
130.3524    31.9677   0.4
END

# plot station name
pstext -Jm -R -B -P -O -K <<END >>map.ps
130.3524    31.9627   13   0.0    1   10   Station
END

# draw mechanism
# longitude latitude strike dip rake magnitude comment
psvelomeca -Jm -R -Sa1.5 -L -G150 -P -O <<END>>map.ps
130.36997   32.06059    11   88  -169   6.5  0  0  Mechanism1 
130.25511   31.91137   192   87   156   6.2  0  0  Mechanism2
END
