forked from GenericMappingTools/gmt
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathGMT_App_G.sh
executable file
·65 lines (59 loc) · 1.02 KB
/
GMT_App_G.sh
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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
#!/usr/bin/env bash
#
# Makes the inset for Appendix G (fonts)
#
# dy is line spacing and y0 is total box height
dy=-0.2222
y0=4.3
yy=4.0778
tr '",' ' ' < "${GMT_SOURCE_DIR}"/src/standard_adobe_fonts.h | awk '{print $2}' > tt.d
gmt begin GMT_App_G
gmt set GMT_THEME cookbook
gmt set MAP_FRAME_PEN thinner
gmt plot -R0/5.4/0/$y0 -Jx1i -B0 <<EOF
>
0.3 0
0.3 $y0
>
2.7 0
2.7 $y0
>
3 0
3 $y0
EOF
gmt text -Y${yy}i -F+f10p+jBC <<EOF
0.15 0.05 \\043
1.55 0.05 Font Name
2.85 0.05 \\043
4.15 0.05 Font Name
EOF
gmt plot <<EOF
0 0
5.4 0
EOF
let i=1
while [ $i -le 17 ]
do
i1=$(( i-1 ))
i2=$(( i1+17 ))
k1=$i
k2=$(( i+17 ))
f1=$(sed -n ${k1}p tt.d)
f2=$(sed -n ${k2}p tt.d)
if [ $i1 -eq "12" ]; then
f1="Symbol @%0%(Symbol)@%%"
fi
fn2=$i2
gmt text -Y${dy}i -F+f+j <<EOF
0.15 0.03 10p,$i1 BC $i1
0.4 0.03 10p,$i1 BL $f1
2.85 0.03 10p,$fn2 BC $i2
3.1 0.03 10p,$i2 BL $f2
EOF
let i=i+1
done
gmt text -Y${dy}i -F+f+j <<EOF
2.85 0.03 10p,Helvetica BC 34
3.1 0.03 10p,ZapfDingbats BL ZapfDingbats @%0%(ZapfDingbats)@%%
EOF
gmt end show