File: GMT_App_E.sh

package info (click to toggle)
gmt 5.3.1%2Bdfsg-2
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 150,460 kB
  • ctags: 18,539
  • sloc: ansic: 194,217; sh: 7,349; xml: 149; makefile: 72; fortran: 49; lisp: 41; csh: 5
file content (43 lines) | stat: -rwxr-xr-x 1,227 bytes parent folder | download | duplicates (2)
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
#!/bin/bash
#	$Id: GMT_App_E.sh 11490 2013-05-16 06:26:21Z pwessel $
#
#	This script makes the documentation in Appendix E.
#
#	Paul Wessel, v 1.1
#
ps=GMT_App_E.ps
xwidth=0.45	# Width of each box (all units are in inches)
ywidth=0.45	# Height of each box
w=0.9		# Width of two adjacent boxes
dx=0.50		# Amont to translate to the right
dy=0.50		# Amount to translate up
y=0.05		# Initial offset in x
x=0.05		# Initial offset in y
back=-5.20	# Amount to translate to left after 1 row

cat << END > tt.App_E.d
0	0
$xwidth	0
$xwidth	$ywidth
0	$ywidth
END

gmt psbasemap -R0/5.75/0/7.55 -Jx1i -P -B0 -K > $ps
for iy in 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
do
	for ix in 1 2 3 4 5 6
	do
		p=`echo "$iy * 6 + $ix" | bc`
		gmt psxy -R0/$xwidth/0/$ywidth -Jx1i -Gp300/$p -O -K tt.App_E.d -X${x}i -Y${y}i >> $ps
		gmt psxy -R -J -Wthinner -L -O -K tt.App_E.d >> $ps
		gmt psxy -R -J -GP300/$p -O -K tt.App_E.d -X${xwidth}i >> $ps
		gmt psxy -R -J -Wthinner -L -O -K tt.App_E.d >> $ps
		echo "0 0.225" | gmt psxy -R0/$w/0/$ywidth -J -O -K -N -Sc0.17i -Wthinnest -Gwhite >> $ps
		echo "0 0.225 $p" | gmt pstext -R0/$w/0/$ywidth -J -O -K -N -F+f9p,Helvetica-Bold >> $ps
		y=0.0
		x=$dx
	done
	y=$dy
	x=$back
done
gmt psxy -R -J -T -O >> $ps