Skip to content

Instantly share code, notes, and snippets.

@mabahamo
Last active August 29, 2015 13:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mabahamo/9831178 to your computer and use it in GitHub Desktop.
Save mabahamo/9831178 to your computer and use it in GitHub Desktop.
Generic Mapping Tool
# color palette for seismicity
#z0 color z1 color
0 white 15 white
15 yellow 30 yellow
30 red 60 red
60 green 150 green
150 blue 1000 blue
S 0.1i c 0.1 - 0.15p 0.3i m<4
S 0.1i c 0.225 - 0.15p 0.3i 4<m<5
S 0.1i c 0.35 - 0.15p 0.3i 5<m<6
S 0.1i c 0.475 - 0.15p 0.3i 6<m<7
G 0.2c
S 0.1i a 0.6 - 0.15p 0.3i m>8
G 0.1c
S 0.1i c 0.35 - 0.15p 0.3i 0-15 km
S 0.1i c 0.35 255/255/0 0.15p 0.3i 15-30 km
S 0.1i c 0.35 255/0/0 0.15p 0.3i 30-60 km
S 0.1i c 0.35 0/255/0 0.15p 0.3i 60-150 km
S 0.1i c 0.35 0/0/255 0.15p 0.3i >150 km
longitudeMin=
longitudeMax=
latitudeMin=
latitudeMax=
quakesFile=
pointOfInterest_longitude=
pointOfInterest_latitude=
bounds="${longitudeMin}/${longitudeMax}/${latitudeMin}/${latitudeMax}"
projection=M16.0
verbose=-V
psfile=test.ps
gmtset ANNOT_FONT_SIZE_PRIMARY 11
/usr/lib/gmt/bin/psbasemap -Ba1f0.5SEWN -JM16.0 -R${bounds} -P -Y6 -V -K > test.ps
grdimage ./gmt/w100s10.Bathymetry.srtm.grd -C/usr/share/gmt/cpt/GMT_globe.cpt -Ba1f0.5SEWN -JM16.0 -R${bounds} -P -V -O -K -I./gmt/w100s10.Bathymetry.srtm.int >> test.ps
pscoast -Ba1f0.5SEWN -JM16.0 -R${bounds} -P -V -Dh -W1.0p/255/0/0 -N1/0.25p/128 -Ia/0.25p/0/0/255 -O -K >> test.ps
psxy -JM16.0 -R${bounds} -C./gmt/quakes.cpt -W2 -O -K -S ${quakesFile} >> test.ps
echo "${pointOfInterest_longitude} ${pointOfInterest_latitude}" | psxy -R${bounds} -J${projection} -W -O -K -Ss0.35 >> test.ps
pslegend -F ./gmt/quake.legend -Dx2c/16.6c/1.2i/1.9i/TC -R${bounds} -J${projection} -G255 -O -K >> test.ps
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment