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

psevents_labels.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
30
31
32
33
34
35
36
37
38
39
  1. #!/usr/bin/env bash
  2. # Make a figure illustrating transparency curve for an event label across time in psevents
  3. gmt begin psevents_labels
  4. cat <<- EOF > B.txt
  5. -0.5 afg t@-r@-
  6. 0 afg t@-b@-
  7. 3 afg t@-e@-
  8. 3.5 afg t@-f@-
  9. EOF
  10. # Rise (t = -0.5 to 0 transparency goes from 100 to 0)
  11. gmt math -T-0.5/0/0.02 1 T 0.5 ADD 2 MUL SUB 2 POW 100 MUL = t.txt
  12. # normal (t = 0 to 3 transparency stays at 0)
  13. gmt math -T0/3/0.1 0 = >> t.txt
  14. # Fade (t = 3 to 3.5 transparency linearly increases to 100 during fading)
  15. gmt math -T3/3.5/0.1 T 3 SUB 2 MUL 100 MUL = >> t.txt
  16. # Code (t = 3.5 5 transparency stays at 100 during coda)
  17. gmt math -T3.5/5/0.1 100 = >> t.txt
  18. gmt basemap -R-1/5/-20/120 -JX6i/1.85i -BWStr -BxcB.txt -Bya+l"Label transparency"
  19. gmt plot -W0.25p,- <<- EOF
  20. -1 0
  21. 6 0
  22. EOF
  23. gmt plot -W2p t.txt
  24. gmt plot -Sv0.15i+bt+et+s -W1.5p,blue <<- EOF
  25. 0 110 3 110
  26. EOF
  27. gmt plot -St0.15i -Gblue <<- EOF
  28. 0 -18
  29. 3 -18
  30. EOF
  31. gmt text -F+f9p -Gwhite <<- EOF
  32. -0.25 -7 RISE
  33. 1.5 -7 NORMAL
  34. 3.25 -7 FADE
  35. 4.25 -7 CODA
  36. 1.5 110 FULL VISIBILITY OF LABEL
  37. EOF
  38. rm -f B.txt t.txt
  39. gmt end show
Tip!

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

Comments

Loading...