11. Chart of Octal Codes for Characters

The characters and their octal codes in the Standard and ISOLatin1 encoded fonts are shown in Figure Octal codes for Standard and ISO. Light red areas signify codes reserved for control characters. In order to use all the extended characters (shown in the light green boxes) you need to set PS_CHAR_ENCODING to Standard+ or ISOLatin1+ in your gmt.conf file [29].

Download PDF version: GMT Standard+ and ISOLatin1+ octal codes

../_images/GMT_App_F_stand%2B_iso%2B.png

Octal codes and corresponding symbols for StandardEncoding (left) and ISOLatin1Encoding (right) fonts.

Here is the source script for the figure above:

rm -f gmt.conf	# We cannot have that set yet, will do later.
cat << EOF > tt.txt
3		1	2	3	4	5	6	7
4	0	1	2	3	4	5	6	7
5	0	1	2	3	4	5	6	7
6	0	1	2	3	4	5	6	7
7	0	1	2	3	4	5	6	7
8	0	1	2	3	4	5	6	7
9	0	1	2	3	4	5	6	7
10	0	1	2	3	4	5	6	7
11	0	1	2	3	4	5	6	7
12	0	1	2	3	4	5	6	7
13	0	1	2	3	4	5	6	7
14	0	1	2	3	4	5	6	7
15	0	1	2	3	4	5	6	7
16	0	1	2	3	4	5	6	7
17	0	1	2	3	4	5	6	7
18	0	1	2	3	4	5	6	7
19	0	1	2	3	4	5	6	7
20		1	2	3	4	5	6	7
21	0	1	2	3	4	5	6	7
22	0	1	2	3	4	5	6	7
23	0	1	2	3	4	5	6	7
24	0	1	2	3	4	5	6	7
25	0	1	2	3	4	5	6	7
26	0	1	2	3	4	5	6	7
27	0	1	2	3	4	5	6	7
28	0	1	2	3	4	5	6	7
29	0	1	2	3	4	5	6	7
30	0	1	2	3	4	5	6	7
31	0	1	2	3	4	5	6	7
EOF


cat << EOF > tt.awk
BEGIN {
	printf "0.5 2.5 10p,4 octal\n"
	for (i = 0; i < 8; i++)
	{
		printf "%g 2.5 10p,4 %d\n", i + 1.5, i
	}
}
{
	printf "0.5 %g 10p,4 \\\\\\\%02ox\n", \$1+0.5, \$1
	for (i = 2; i <= NF; i++)
	{
		printf "%g %g 10p,4 \\\\%02o%o\n", \$i+1.5, \$1+0.5, \$1, \$i
	}
}
EOF

$AWK -f tt.awk tt.txt > tt.d

gmt begin
	gmt set GMT_THEME cookbook
	gmt set MAP_FRAME_PEN thick FONT_TITLE 14p

	gmt figure stand+ png A,E600

	gmt set PS_CHAR_ENCODING Standard+

	gmt plot -R0/9/2/32 -Jx0.345i/-0.21i -BN+tStandard+ -Glightred -Y0.0 << EOF
>
1	4
2	4
2	3
1	3
>
1	21
2	21
2	20
1	20
EOF
	gmt plot -Glightgreen << EOF
>
2	4
9	4
9	3
2	3
>
8	16
9	16
9	15
8	15
>
1	20
9	20
9	16
1	16
>
1	23
2	23
2	22
1	22
>
6	23
7	23
7	22
6	22
>
7	24
8	24
8	23
7	23
>
1	25
2	25
2	24
1	24
>
2	26
3	26
3	25
2	25
>
5	26
6	26
6	25
5	25
>
2	27
9	27
9	26
2	26
>
1	28
9	28
9	27
1	27
>
1	29
2	29
2	28
1	28
>
3	29
4	29
4	28
3	28
>
5	29
9	29
9	28
5	28
>
1	30
2	30
2	29
1	29
>
5	30
9	30
9	29
5	29
>
1	31
2	31
2	30
1	30
>
3	31
6	31
6	30
3	30
>
7	31
9	31
9	30
7	30
>
1	32
2	32
2	31
1	31
>
5	32
9	32
9	31
5	31
EOF
	gmt text tt.d -F+f
	gmt plot -Bg1 -Wthick << EOF
>
0	3
9	3
>
1	2
1	32
EOF

	gmt figure iso+ png A,E600
	gmt set PS_CHAR_ENCODING ISOLatin1+

	gmt plot -R0/9/2/32 -Jx0.345i/-0.21i -BN+tISOLatin1+ -Glightred -Y0.0 << EOF
>
1	4
2	4
2	3
1	3
>
1	21
2	21
2	20
1	20
EOF
	gmt plot -Glightgreen << EOF
>
2	4
9	4
9	3
2	3
>
8	16
9	16
9	15
8	15
>
1	18
9	18
9	16
1	16
>
2	20
3	20
3	19
2	19
>
5	20
6	20
6	19
5	19
EOF
	gmt text tt.d -F+f
	gmt plot -Bg1 -Wthick << EOF
>
0	3
9	3
>
1	2
1	32
EOF
gmt end

gmt set -Du PS_CHAR_ENCODING ISOLatin1+ GMT_GRAPHICS_FORMAT ps
gmt begin GMT_App_F_stand+_iso+
	gmt image stand+.png -Dx0/0+r600
	gmt image iso+.png -Dx0/0+r600 -X3.2i
gmt end show
rm stand+.png iso+.png tt.awk tt.d tt.txt

The chart for the Symbol character set (GMT font number 12) and Pifont ZapfDingbats character set (font number 34) are presented in Figure Octal codes for Symbol and ZapfDingbats below. The octal code is obtained by appending the column value to the \?? value, e.g., \(\partial\) is \266 in the Symbol font. The euro currency symbol is \240 in the Symbol font and will print if your printer supports it (older printer’s firmware will not know about the euro).

Download PDF version: GMT Symbol and ZapfDingbats octal codes

../_images/GMT_App_F_symbol_dingbats.png

Octal codes and corresponding symbols for Symbol (left) and ZapfDingbats (right) fonts.

Here is the source script for the figure above:

gmt begin GMT_App_F_symbol_dingbats
gmt set GMT_THEME cookbook
gmt set MAP_FRAME_PEN thick FONT_TITLE 14p

gmt set PS_CHAR_ENCODING ISOLatin1+


cat << EOF > tt.txt
4	0	1	2	3	4	5	6	7
5	0	1	2	3	4	5	6	7
6	0	1	2	3	4	5	6	7
7	0	1	2	3	4	5	6	7
8	0	1	2	3	4	5	6	7
9	0	1	2	3	4	5	6	7
10	0	1	2	3	4	5	6	7
11	0	1	2	3	4	5	6	7
12	0	1	2	3	4	5	6	7
13	0	1	2	3	4	5	6	7
14	0	1	2	3	4	5	6	7
15	0	1	2	3	4	5	6
EOF


cat << EOF > tt.awk
BEGIN {
	printf "0.5 3.5 10p,4 octal\n"
	for (i = 0; i < 8; i++)
	{
		printf "%g 3.5 10p,4 %d\n", i + 1.5, i
	}
}
{
	printf "0.5 %g 10p,4 \\\\\\\%02ox\n", \$1+0.5, \$1
	for (i = 2; i <= NF; i++)
	{
		printf "%g %g 10p,12 \\\\%02o%o\n", \$i+1.5, \$1+0.5, \$1, \$i
	}
}
EOF

$AWK -f tt.awk tt.txt > tt.d
gmt plot -R0/9/3/16 -Jx0.345i/-0.21i -BN+tSymbol -Glightgreen -Y2.58i << EOF
>
8	16
9	16
9	15
8	15
EOF
gmt text tt.d -F+f
gmt plot -Bg1 -Wthick << EOF
>
0	4
9	4
>
1	3
1	16
EOF

cat << EOF > tt.txt
20	0	1	2	3	4	5	6	7
21	0	1	2	3	4	5	6	7
22	0	1	2	3	4	5	6	7
23	0	1	2	3	4	5	6	7
24	0	1	2	3	4	5	6	7
25	0	1	2	3	4	5	6	7
26	0	1	2	3	4	5	6	7
27	0	1	2	3	4	5	6	7
28	0	1	2	3	4	5	6	7
29	0	1	2	3	4	5	6	7
30	0	1	2	3	4	5	6	7
31	0	1	2	3	4	5	6
EOF

cat << EOF > tt.awk
{
	printf "0.5 %g 10p,4 \\\\\\\%02ox\n", \$1+0.5, \$1
	for (i = 2; i <= NF; i++)
	{
		printf "%g %g 10p,12 \\\\%02o%o\n", \$i+1.5, \$1+0.5, \$1, \$i
	}
}
EOF

$AWK -f tt.awk tt.txt > tt.d
gmt plot -R0/9/20/32 -Glightgreen -Y-2.58i << EOF
>
8	32
9	32
9	31
8	31
EOF
gmt text tt.d -F+f
gmt plot -Bg1 -Wthick << EOF
>
1	20
1	32
EOF




cat << EOF > tt.txt
4	0	1	2	3	4	5	6	7
5	0	1	2	3	4	5	6	7
6	0	1	2	3	4	5	6	7
7	0	1	2	3	4	5	6	7
8	0	1	2	3	4	5	6	7
9	0	1	2	3	4	5	6	7
10	0	1	2	3	4	5	6	7
11	0	1	2	3	4	5	6	7
12	0	1	2	3	4	5	6	7
13	0	1	2	3	4	5	6	7
14	0	1	2	3	4	5	6	7
15	0	1	2	3	4	5	6
EOF


cat << EOF > tt.awk
BEGIN {
	printf "0.5 3.5 10p,4 octal\n"
	for (i = 0; i < 8; i++)
	{
		printf "%g 3.5 10p,4 %d\n", i + 1.5, i
	}
}
{
	printf "0.5 %g 10p,4 \\\\\\\%02ox\n", \$1+0.5, \$1
	for (i = 2; i <= NF; i++)
	{
		printf "%g %g 10p,34 \\\\%02o%o\n", \$i+1.5, \$1+0.5, \$1, \$i
	}
}
EOF

$AWK -f tt.awk tt.txt > tt.d

gmt set PS_CHAR_ENCODING ISOLatin1+

gmt plot -R0/9/3/16 -Jx0.345i/-0.21i -BN+tZapfDingbats -Glightgreen -X3.2i -Y2.58i << EOF
>
8	16
9	16
9	15
8	15
EOF
gmt text tt.d -F+f
gmt plot -Bg1 -Wthick << EOF
>
0	4
9	4
>
1	3
1	16
EOF

cat << EOF > tt.txt
20		1	2	3	4	5	6	7
21	0	1	2	3	4	5	6	7
22	0	1	2	3	4	5	6	7
23	0	1	2	3	4	5	6	7
24	0	1	2	3	4	5	6	7
25	0	1	2	3	4	5	6	7
26	0	1	2	3	4	5	6	7
27	0	1	2	3	4	5	6	7
28	0	1	2	3	4	5	6	7
29	0	1	2	3	4	5	6	7
30	0	1	2	3	4	5	6	7
31	0	1	2	3	4	5	6
EOF

cat << EOF > tt.awk
{
	printf "0.5 %g 10p,4 \\\\\\\%02ox\n", \$1+0.5, \$1
	for (i = 2; i <= NF; i++)
	{
		printf "%g %g 10p,34 \\\\%02o%o\n", \$i+1.5, \$1+0.5, \$1, \$i
	}
}
EOF

$AWK -f tt.awk tt.txt > tt.d
gmt plot -R0/9/20/32 -Glightgreen -Y-2.58i << EOF
>
1	21
2	21
2	20
1	20
>
8	32
9	32
9	31
8	31
EOF
gmt text tt.d -F+f
gmt plot -Bg1 -Wthick << EOF
>
1	20
1	32
EOF
gmt end show

11.1. Footnote