-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathplot_data_model_residual.gmt
executable file
·34 lines (24 loc) · 1.36 KB
/
plot_data_model_residual.gmt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
#!/bin/csh
set infile = 'displacements.dat'
set faultfile = 'surfacetrace.dat'
set outfile = 'data_model_resid.ps'
set datacolpal = 'data.cpt'
set residcolpal = 'resid.cpt'
makecpt -Crainbow -T-0.65/0.1/0.025 > $datacolpal
makecpt -Crainbow -T-0.1/0.1/0.005 > $residcolpal
#residual
awk '{print $1/1000, $2/1000, $5}' $infile | psxy -Jx0.1c -R705/780/4190/4270 -C$residcolpal -Ba20f10WeSn -Sc0.1c -P -K > $outfile
awk '{print $1/1000, $2/1000; print $3/1000, $4/1000}' $faultfile | psxy -Jx -R -W5 -O -K >> $outfile
echo 710 4265 14 0 1 TL resid | pstext -Jx -R -O -K >> $outfile
psscale -D0.75c/2c/3c/0.5c -Ba0.05f0.025 -C$residcolpal -O -K >> $outfile
#data
awk '{print $1/1000, $2/1000, $3}' $infile | psxy -Jx0.1c -R705/780/4190/4270 -C$datacolpal -Ba20f10WeSn -Sc0.1c -O -K -Y10c >> $outfile
awk '{print $1/1000, $2/1000; print $3/1000, $4/1000}' $faultfile | psxy -Jx -R -W5 -O -K >> $outfile
echo 710 4265 14 0 1 TL data | pstext -Jx -R -O -K >> $outfile
psscale -D0.75c/2c/3c/0.5c -Ba0.2f0.1 -C$datacolpal -O -K >> $outfile
#model
awk '{print $1/1000, $2/1000, $4}' $infile | psxy -Jx0.1c -R705/780/4190/4270 -C$datacolpal -Ba20f10WeSn -Sc0.1c -O -K -X9.5c >> $outfile
awk '{print $1/1000, $2/1000; print $3/1000, $4/1000}' $faultfile | psxy -Jx -R -W5 -O -K >> $outfile
echo 710 4265 14 0 1 TL model | pstext -Jx -R -O -K >> $outfile
echo showpage >> $outfile
open $outfile