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_size.sh 1.4 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
48
49
50
51
  1. #!/usr/bin/env bash
  2. # Make a figure illustration size curve for an event across time in psevents
  3. gmt begin psevents_size
  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 symbol size goes from 0 to 5x)
  13. gmt math -T-0.5/0/0.02 T 0.5 ADD 2 MUL 2 POW 5 MUL = t.txt
  14. # plateau (t = 0 to 0.5 symbol size stays at 5x)
  15. gmt math -T0/0.6/0.1 5 = >> t.txt
  16. # Decay (t = 0.5 to 1.5 symbol size decays from 5x to 1x)
  17. gmt math -T0.6/1.5/0.02 0.9 T 0.6 SUB SUB 0.9 DIV 2 POW 4 MUL 1 ADD = >> t.txt
  18. # active (t = 1.5 to 3 symbol size stays at 1x)
  19. gmt math -T1.5/3/0.1 1 = >> t.txt
  20. # Fade (t = 3 to 3.5 symbol size linearly drops to 0.3 during fading)
  21. gmt math -T3/3.5/0.1 T 3 SUB 1.4 MUL NEG 1 ADD = >> t.txt
  22. # Code (t = 3.5 5 symbol size stays at 0.3 during code)
  23. gmt math -T3.5/5/0.1 0.3 = >> t.txt
  24. gmt basemap -R-1/5/-1/6.5 -JX6i/2i -BWStr -BxcB.txt -Byag10+l"Symbol magnification"
  25. gmt plot -W0.25p,- <<- EOF
  26. -1 1
  27. 6 1
  28. EOF
  29. gmt plot -W2p t.txt
  30. gmt plot -Sv0.15i+bt+et+s -W1.5p,red <<- EOF
  31. -0.5 5.5 1.5 5.5
  32. EOF
  33. gmt plot -Sv0.15i+bt+et+s -W1.5p,blue <<- EOF
  34. 0 6 3 6
  35. EOF
  36. gmt plot -St0.15i -Gblue <<- EOF
  37. 0 -0.9
  38. 3 -0.9
  39. EOF
  40. gmt text -F+f9p -Gwhite <<- EOF
  41. -0.25 -0.4 RISE
  42. 0.3 -0.4 PLATEAU
  43. 1 -0.4 DECAY
  44. 2.25 -0.4 NORMAL
  45. 3.25 -0.4 FADE
  46. 4.25 -0.4 CODA
  47. 0.5 5.5 ANNOUNCE
  48. 1.5 6 DURATION OF EVENT
  49. EOF
  50. rm -f B.txt t.txt
  51. gmt end show
Tip!

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

Comments

Loading...