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

nnn.sh 767 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
25
26
  1. #!/usr/bin/env bash
  2. #
  3. # Test Delauney and Voronoi for Cartesian data
  4. ps=nnn.ps
  5. cat << EOF > tridata.txt
  6. 2.53857 5.16657 0
  7. 2.48365 6.26811 1
  8. 8.68883 4.55983 2
  9. 4.11104 7.78623 3
  10. 1.79704 6.53027 4
  11. 7.17493 3.81713 5
  12. 3.41052 8.18161 6
  13. 8.35062 1.43348 7
  14. 8.1706 4.46765 8
  15. 5.27815 1.15172 9
  16. EOF
  17. gmt makecpt -Ccategorical -T0/10/1 > t.cpt
  18. gmt triangulate tridata.txt -Qn -R0/10/0/10 -Gjunk.nc -I0.05 -T > t.txt
  19. gmt grdimage junk.nc -JX4i -P -Baf -BWSnE+t"Natural Nearest Neighbor Gridding" -Ct.cpt -K -Xc > $ps
  20. gmt psxy -R -J -O -K -W0.25p t.txt >> $ps
  21. gmt psxy -R -J -O -Sc0.25c -Gwhite -W0.25p tridata.txt -K >> $ps
  22. gmt psxy -R -J -O -W1p+cf -L t.txt -Ct.cpt -Baf -BWsNE+t"Voronoi polygons" -K -Y4.75i >> $ps
  23. gmt psxy -R -J -O -Sc0.25c -Gwhite -W0.25p tridata.txt >> $ps
Tip!

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

Comments

Loading...