File: GMT_mapscale.sh

package info (click to toggle)
gmt 6.4.0%2Bdfsg-2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 107,344 kB
  • sloc: ansic: 272,264; sh: 8,955; fortran: 49; makefile: 44; perl: 32; csh: 9
file content (17 lines) | stat: -rwxr-xr-x 400 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#!/usr/bin/env bash
gmt begin GMT_mapscale
	gmt set GMT_THEME cookbook
	gmt basemap -R0/40/50/56 -JM5i -B -LjML+c53+w1000k+f+l"Scale at 53@.N" -F+glightcyan+c0+p
	gmt basemap -LjBR+c53+w1000k+l+f -F+p1p+i+gwhite+c0.1i
	h=$(gmt mapproject -Wh -Di)
	h=$(gmt math -Q $h 2 DIV =)
	lat=$(echo 0 $h | gmt mapproject -I -Di -o1)
	gmt plot -Wfaint -A -N << EOF
>
0	$lat
40	$lat
>
0	50
40	50
EOF
gmt end show