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

ex12.sh 1.1 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
  1. #!/usr/bin/env bash
  2. # GMT EXAMPLE 12
  3. #
  4. # Purpose: Illustrates Delaunay triangulation of points, and contouring
  5. # GMT modules: makecpt, gmtinfo, contour, text, plot, triangulate, subplot
  6. # Unix progs: rm
  7. #
  8. gmt begin ex12
  9. # Contour the data and draw triangles using dashed pen; use "gmt gmtinfo" and "gmt makecpt" to make a
  10. # color palette (.cpt) file
  11. T=$(gmt info -T25+c2 @Table_5_11.txt)
  12. gmt makecpt -Cjet $T
  13. gmt subplot begin 2x2 -M0.1c -Fs8c/0 -Scb -Srl -R0/6.5/-0.2/6.5 -JX8c -BWSne -T"Delaunay Triangulation"
  14. # First draw network and label the nodes
  15. gmt triangulate @Table_5_11.txt -M > net.xy
  16. gmt plot net.xy -Wthinner -c0,0
  17. gmt plot @Table_5_11.txt -Sc0.3c -Gwhite -Wthinnest
  18. gmt text @Table_5_11.txt -F+f6p+r
  19. # Then draw network and print the node values
  20. gmt plot net.xy -Wthinner -c0,1
  21. gmt plot @Table_5_11.txt -Sc0.1c -Gblack
  22. gmt text @Table_5_11.txt -F+f6p+jLM -Gwhite -W -C1p -D6p/0i -N
  23. gmt contour @Table_5_11.txt -Wthin -C -Lthinnest,- -Gd3c -c1,0
  24. # Finally color the topography
  25. gmt contour @Table_5_11.txt -C -I -c1,1
  26. gmt subplot end
  27. gmt end show
  28. #
  29. rm -f net.xy
Tip!

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

Comments

Loading...