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

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

Comments

Loading...