Register
Login
Resources
Docs Blog Datasets Glossary Case Studies Tutorials & Webinars
Product
Data Engine LLMs Platform Enterprise
Pricing Explore
Connect to our Discord channel

ex53.sh 885 B

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
  1. #!/usr/bin/env bash
  2. # GMT_DISABLE_TEST
  3. # GMT EXAMPLE 53
  4. #
  5. # Purpose: Illustrate subplot with loops
  6. # GMT modules: makecpt, subplot, set, plot, grdimage, clip, coast
  7. #
  8. gmt begin ex53 png
  9. gmt set PROJ_ELLIPSOID Sphere MAP_ANNOT_OBLIQUE lon_horizontal,lat_parallel,tick_normal FONT_TAG 10p
  10. gmt makecpt -Cterra
  11. data=$(gmt which -G @Top12Cities.txt)
  12. gmt subplot begin 4x3 -Fs6c -A+gwhite+p0.25p+o0.2c+sblack@50 -Baf -R-1500/1500/-1500/1500+uk -X1c -Y0.9c
  13. while read lon lat population iso name; do
  14. gmt subplot set -A"${name} [${population}M]"
  15. gmt grdimage @earth_relief_06m -JA${lon}/${lat}/? -I+m-0.5
  16. gmt coast -E${iso}+c
  17. gmt grdimage @earth_relief_06m -JA${lon}/${lat}/? -I+d
  18. gmt clip -C
  19. gmt coast -E${iso}+pfaint -N1/thinner,darkred
  20. echo ${lon} ${lat} | gmt plot -Skcity/0.25c -Gred -W0.5p -B0
  21. done < $data
  22. gmt subplot end
  23. gmt end show
Tip!

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

Comments

Loading...