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

condcust_symbol_xy.sh 624 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
27
28
29
  1. #!/usr/bin/env bash
  2. # Test custom symbol with conditional statements accessing lon, lat or x,y
  3. ps=condcust_symbol_xy.ps
  4. cat << EOF > sample_data.txt
  5. 1 1
  6. -1 1
  7. -1 -1
  8. 1 -1
  9. EOF
  10. cat << EOF > xy.def
  11. if \$x >= 0 then {
  12. if \$y > 0 then {
  13. 0 0 1.0 c -W3p,black -G-
  14. } else {
  15. 0 0 1.0 c -W3p,orange -G-
  16. }
  17. } else {
  18. if \$y > 0 then {
  19. 0 0 1.0 c -W3p,red -G-
  20. } else {
  21. 0 0 1.0 c -W3p,green -G-
  22. }
  23. }
  24. EOF
  25. # First plot as Cartesian
  26. gmt psxy -R-2/2/-2/2 -JX4i -P -Bafg1 -BWSne -Skxy/1i sample_data.txt -Xc -K > $ps
  27. # Second plot as Geographic
  28. gmt psxy -R -JM4i -O -Bafg1 -BWSne -Skxy/1i sample_data.txt -Y4.75i >> $ps
Tip!

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

Comments

Loading...