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

trimvector.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
  1. #!/usr/bin/env bash
  2. #
  3. # Test vectors with mid-heads and trimming
  4. ps=trimvector.ps
  5. function plot { # The args are -X -Y and -Sv<something>
  6. gmt psxy -R0/1.75/0/1.8 -J -O -K v.txt -Gred -W0.5p -B0 $*
  7. gmt psxy -R -J -O -K p.txt -Sc0.2i -Wfaint
  8. }
  9. cat << EOF >p.txt
  10. 0.3 0.3
  11. 1.5 1.0
  12. 0.7 1.6
  13. EOF
  14. gmt convert p.txt -Fv p.txt > v.txt
  15. gmt set MAP_VECTOR_SHAPE 0.5
  16. gmt psxy -R0/7/0/9 -Jx1i -P -K -T -Xc > $ps
  17. # Vectors at various ends and one with no vector
  18. plot -Sv0.2i+t0.1i+s+e >> $ps
  19. plot -Sv0.2i+t0.1i+s+b -X1.75i >> $ps
  20. plot -Sv0.2i+t0.1i+s+b+e -X1.75i >> $ps
  21. plot -Sv0.2i+t0.1i+s -X1.75i >> $ps
  22. # Mid-point vectors and half vectors
  23. plot -Sv0.2i+t0.1i+s+mf -X-5.25i -Y1.8i >> $ps
  24. plot -Sv0.2i+t0.1i+s+mr -X1.75i >> $ps
  25. plot -Sv0.2i+t0.1i+s+mfl -X1.75i >> $ps
  26. plot -Sv0.2i+t0.1i+s+mfr -X1.75i >> $ps
  27. # Mid-point circles + terminal
  28. plot -Sv0.2i+t0.1i+s+mc -X-5.25i -Y1.8i >> $ps
  29. plot -Sv0.2i+t0.1i+s+mcl -X1.75i >> $ps
  30. plot -Sv0.2i+t0.1i+s+mcr -X1.75i >> $ps
  31. plot -Sv0.2i+t0.1i+s+mt -X1.75i >> $ps
  32. # Mid-point terminals and squares
  33. plot -Sv0.2i+t0.1i+s+mtl -X-5.25i -Y1.8i >> $ps
  34. plot -Sv0.2i+t0.1i+s+mtr -X1.75i >> $ps
  35. plot -Sv0.2i+t0.1i+s+ms -X1.75i >> $ps
  36. plot -Sv0.2i+t0.1i+s+msl -X1.75i >> $ps
  37. # Vectors at various ends with extra trim
  38. plot -Sv0.2i+t0.1i+s+msr -X-5.25i -Y1.8i >> $ps
  39. plot -Sv0.2i+t0.15i+s+e -X1.75i >> $ps
  40. plot -Sv0.2i+t0.15i+s+b -X1.75i >> $ps
  41. plot -Sv0.2i+t0.15i+s+b+e -X1.75i >> $ps
  42. gmt psxy -R -J -O -T >> $ps
Tip!

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

Comments

Loading...