Register
Login
Resources
Docs Blog Datasets Glossary Case Studies Tutorials & Webinars
Product
Data Engine LLMs Platform Enterprise
Pricing Explore
Connect to our Discord channel

GMT_App_G.sh 1.0 KB

You have to be logged in to leave a comment. Sign In
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
  1. #!/usr/bin/env bash
  2. #
  3. # Makes the inset for Appendix G (fonts)
  4. #
  5. # dy is line spacing and y0 is total box height
  6. dy=-0.2222
  7. y0=4.3
  8. yy=4.0778
  9. tr '",' ' ' < "${GMT_SOURCE_DIR}"/src/standard_adobe_fonts.h | awk '{print $2}' > tt.d
  10. gmt begin GMT_App_G
  11. gmt set GMT_THEME cookbook
  12. gmt set MAP_FRAME_PEN thinner
  13. gmt plot -R0/5.4/0/$y0 -Jx1i -B0 <<EOF
  14. >
  15. 0.3 0
  16. 0.3 $y0
  17. >
  18. 2.7 0
  19. 2.7 $y0
  20. >
  21. 3 0
  22. 3 $y0
  23. EOF
  24. gmt text -Y${yy}i -F+f10p+jBC <<EOF
  25. 0.15 0.05 \\043
  26. 1.55 0.05 Font Name
  27. 2.85 0.05 \\043
  28. 4.15 0.05 Font Name
  29. EOF
  30. gmt plot <<EOF
  31. 0 0
  32. 5.4 0
  33. EOF
  34. let i=1
  35. while [ $i -le 17 ]
  36. do
  37. i1=$(( i-1 ))
  38. i2=$(( i1+17 ))
  39. k1=$i
  40. k2=$(( i+17 ))
  41. f1=$(sed -n ${k1}p tt.d)
  42. f2=$(sed -n ${k2}p tt.d)
  43. if [ $i1 -eq "12" ]; then
  44. f1="Symbol @%0%(Symbol)@%%"
  45. fi
  46. fn2=$i2
  47. gmt text -Y${dy}i -F+f+j <<EOF
  48. 0.15 0.03 10p,$i1 BC $i1
  49. 0.4 0.03 10p,$i1 BL $f1
  50. 2.85 0.03 10p,$fn2 BC $i2
  51. 3.1 0.03 10p,$i2 BL $f2
  52. EOF
  53. let i=i+1
  54. done
  55. gmt text -Y${dy}i -F+f+j <<EOF
  56. 2.85 0.03 10p,Helvetica BC 34
  57. 3.1 0.03 10p,ZapfDingbats BL ZapfDingbats @%0%(ZapfDingbats)@%%
  58. EOF
  59. gmt end show
Tip!

Press p or to see the previous file or, n or to see the next file

Comments

Loading...