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

custom_textconditional.sh 697 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
30
31
  1. #!/usr/bin/env bash
  2. #
  3. # Test custom symbol with condition test on words
  4. ps=custom_textconditional.ps
  5. cat << EOF > location.txt
  6. 160 0 A CWT C
  7. 180 15 A CNT B
  8. -160 0 D CET C
  9. 180 -15 A CST C
  10. EOF
  11. cat << EOF > ifelse0.def
  12. N: 1 s
  13. if \$t0 == A then {
  14. 0 0 1 c -W3p,red
  15. } else {
  16. 0 0 1 c -W5p,green
  17. }
  18. EOF
  19. cat << EOF > ifelse2.def
  20. N: 1 s
  21. if \$t2 == C then {
  22. 0 0 1 c -W3p,red
  23. } else {
  24. 0 0 1 c -W5p,green
  25. }
  26. EOF
  27. gmt psxy -R60/300/-60/60 -JM16c -Baf location.txt -Skifelse0/2c -P -K > $ps
  28. awk '{print $1, $2, $3}' location.txt | gmt pstext -R -J -O -K -F+f14p >> $ps
  29. gmt psxy -R -J -Baf location.txt -Skifelse2/2c -O -K -Y12c >> $ps
  30. awk '{print $1, $2, $5}' location.txt | gmt pstext -R -J -O -F+f14p >> $ps
Tip!

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

Comments

Loading...