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_F_symbol_dingbats.sh 3.8 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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
  1. #!/usr/bin/env bash
  2. #
  3. # Makes the octal code charts in Appendix F
  4. #
  5. # Use the row, col values to generate the octal code needed and
  6. # plot it with gmt pstext, including the header row and left column
  7. gmt begin GMT_App_F_symbol_dingbats
  8. gmt set MAP_FRAME_PEN thick FONT_TITLE 14p
  9. # Chart for Symbols font
  10. gmt set PS_CHAR_ENCODING ISOLatin1+
  11. # First col is row number, the remaining cols are col number in table
  12. # that has a printable character
  13. cat << EOF > tt.txt
  14. 4 0 1 2 3 4 5 6 7
  15. 5 0 1 2 3 4 5 6 7
  16. 6 0 1 2 3 4 5 6 7
  17. 7 0 1 2 3 4 5 6 7
  18. 8 0 1 2 3 4 5 6 7
  19. 9 0 1 2 3 4 5 6 7
  20. 10 0 1 2 3 4 5 6 7
  21. 11 0 1 2 3 4 5 6 7
  22. 12 0 1 2 3 4 5 6 7
  23. 13 0 1 2 3 4 5 6 7
  24. 14 0 1 2 3 4 5 6 7
  25. 15 0 1 2 3 4 5 6
  26. EOF
  27. # Use the row, col values to generate the octal code needed and
  28. # plot it with gmt pstext, including the header row and left column
  29. cat << EOF > tt.awk
  30. BEGIN {
  31. printf "0.5 3.5 10p,4 octal\n"
  32. for (i = 0; i < 8; i++)
  33. {
  34. printf "%g 3.5 10p,4 %d\n", i + 1.5, i
  35. }
  36. }
  37. {
  38. printf "0.5 %g 10p,4 \\\\\\\%02ox\n", \$1+0.5, \$1
  39. for (i = 2; i <= NF; i++)
  40. {
  41. printf "%g %g 10p,12 \\\\%02o%o\n", \$i+1.5, \$1+0.5, \$1, \$i
  42. }
  43. }
  44. EOF
  45. $AWK -f tt.awk tt.txt > tt.d
  46. gmt plot -R0/9/3/16 -Jx0.345i/-0.21i -BN+tSymbol -Glightgreen -Y2.58i << EOF
  47. >
  48. 8 16
  49. 9 16
  50. 9 15
  51. 8 15
  52. EOF
  53. gmt text tt.d -F+f
  54. gmt plot -Bg1 -Wthick << EOF
  55. >
  56. 0 4
  57. 9 4
  58. >
  59. 1 3
  60. 1 16
  61. EOF
  62. cat << EOF > tt.txt
  63. 20 0 1 2 3 4 5 6 7
  64. 21 0 1 2 3 4 5 6 7
  65. 22 0 1 2 3 4 5 6 7
  66. 23 0 1 2 3 4 5 6 7
  67. 24 0 1 2 3 4 5 6 7
  68. 25 0 1 2 3 4 5 6 7
  69. 26 0 1 2 3 4 5 6 7
  70. 27 0 1 2 3 4 5 6 7
  71. 28 0 1 2 3 4 5 6 7
  72. 29 0 1 2 3 4 5 6 7
  73. 30 0 1 2 3 4 5 6 7
  74. 31 0 1 2 3 4 5 6
  75. EOF
  76. cat << EOF > tt.awk
  77. {
  78. printf "0.5 %g 10p,4 \\\\\\\%02ox\n", \$1+0.5, \$1
  79. for (i = 2; i <= NF; i++)
  80. {
  81. printf "%g %g 10p,12 \\\\%02o%o\n", \$i+1.5, \$1+0.5, \$1, \$i
  82. }
  83. }
  84. EOF
  85. $AWK -f tt.awk tt.txt > tt.d
  86. gmt plot -R0/9/20/32 -Glightgreen -Y-2.58i << EOF
  87. #> The Euro symbol now goes here so I have commented out this green box
  88. #1 21
  89. #2 21
  90. #2 20
  91. #1 20
  92. >
  93. 8 32
  94. 9 32
  95. 9 31
  96. 8 31
  97. EOF
  98. gmt text tt.d -F+f
  99. gmt plot -Bg1 -Wthick << EOF
  100. >
  101. 1 20
  102. 1 32
  103. EOF
  104. ########################################################################################
  105. # Now the dinghbats script
  106. ########################################################################################
  107. # First col is row number, the remaining cols are col number in table
  108. # that has a printable character
  109. cat << EOF > tt.txt
  110. 4 0 1 2 3 4 5 6 7
  111. 5 0 1 2 3 4 5 6 7
  112. 6 0 1 2 3 4 5 6 7
  113. 7 0 1 2 3 4 5 6 7
  114. 8 0 1 2 3 4 5 6 7
  115. 9 0 1 2 3 4 5 6 7
  116. 10 0 1 2 3 4 5 6 7
  117. 11 0 1 2 3 4 5 6 7
  118. 12 0 1 2 3 4 5 6 7
  119. 13 0 1 2 3 4 5 6 7
  120. 14 0 1 2 3 4 5 6 7
  121. 15 0 1 2 3 4 5 6
  122. EOF
  123. # Use the row, col values to generate the octal code needed and
  124. # plot it with gmt pstext, including the header row and left column
  125. cat << EOF > tt.awk
  126. BEGIN {
  127. printf "0.5 3.5 10p,4 octal\n"
  128. for (i = 0; i < 8; i++)
  129. {
  130. printf "%g 3.5 10p,4 %d\n", i + 1.5, i
  131. }
  132. }
  133. {
  134. printf "0.5 %g 10p,4 \\\\\\\%02ox\n", \$1+0.5, \$1
  135. for (i = 2; i <= NF; i++)
  136. {
  137. printf "%g %g 10p,34 \\\\%02o%o\n", \$i+1.5, \$1+0.5, \$1, \$i
  138. }
  139. }
  140. EOF
  141. $AWK -f tt.awk tt.txt > tt.d
  142. # Chart for ZapfDingbats
  143. gmt set PS_CHAR_ENCODING ISOLatin1+
  144. gmt plot -R0/9/3/16 -Jx0.345i/-0.21i -BN+tZapfDingbats -Glightgreen -X3.2i -Y2.58i << EOF
  145. >
  146. 8 16
  147. 9 16
  148. 9 15
  149. 8 15
  150. EOF
  151. gmt text tt.d -F+f
  152. gmt plot -Bg1 -Wthick << EOF
  153. >
  154. 0 4
  155. 9 4
  156. >
  157. 1 3
  158. 1 16
  159. EOF
  160. cat << EOF > tt.txt
  161. 20 1 2 3 4 5 6 7
  162. 21 0 1 2 3 4 5 6 7
  163. 22 0 1 2 3 4 5 6 7
  164. 23 0 1 2 3 4 5 6 7
  165. 24 0 1 2 3 4 5 6 7
  166. 25 0 1 2 3 4 5 6 7
  167. 26 0 1 2 3 4 5 6 7
  168. 27 0 1 2 3 4 5 6 7
  169. 28 0 1 2 3 4 5 6 7
  170. 29 0 1 2 3 4 5 6 7
  171. 30 0 1 2 3 4 5 6 7
  172. 31 0 1 2 3 4 5 6
  173. EOF
  174. cat << EOF > tt.awk
  175. {
  176. printf "0.5 %g 10p,4 \\\\\\\%02ox\n", \$1+0.5, \$1
  177. for (i = 2; i <= NF; i++)
  178. {
  179. printf "%g %g 10p,34 \\\\%02o%o\n", \$i+1.5, \$1+0.5, \$1, \$i
  180. }
  181. }
  182. EOF
  183. $AWK -f tt.awk tt.txt > tt.d
  184. gmt plot -R0/9/20/32 -Glightgreen -Y-2.58i << EOF
  185. >
  186. 1 21
  187. 2 21
  188. 2 20
  189. 1 20
  190. >
  191. 8 32
  192. 9 32
  193. 9 31
  194. 8 31
  195. EOF
  196. gmt text tt.d -F+f
  197. gmt plot -Bg1 -Wthick << EOF
  198. >
  199. 1 20
  200. 1 32
  201. EOF
  202. gmt end show
Tip!

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

Comments

Loading...