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

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

Comments

Loading...