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

vectors.sh 1.3 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
  1. #!/usr/bin/env bash
  2. # Test gmt psrose windrose with or without vector heads
  3. ps=vectors.ps
  4. data=`gmt which -G @azimuth_lengths.txt`
  5. awk '{if ((NR%50) == 0) print $0}' $data > subset.txt
  6. common0n="subset.txt -: -JX7c -F -L -Ggray -R0/3/-90/90 -Bxg1 -Byg90 -BWESN -O -K"
  7. common1n="subset.txt -: -JX7c -F -L -Ggray -R0/3/0/180 -Bxg1 -Byg90 -BWESN -O -K"
  8. commonn="subset.txt -: -JX7c -F -L -Ggray -R0/750/0/360 -Bxg200 -Byg90 -BWESN -O -K"
  9. commonu="subset.txt -: -JX7c -F -L -R0/3/0/360 -Bxg1 -Byg90 -BWESN -O -K"
  10. # Set up blank plot
  11. gmt psxy -R0/5/0/5 -Jx1c -P -K -T > $ps
  12. gmt set MAP_VECTOR_SHAPE 0.5
  13. # 3Windrose diagram
  14. # col 1: Default plot
  15. gmt psrose $commonu >> $ps
  16. # Row 2: Apply -T
  17. gmt psrose $commonu -T -Y7.5c >> $ps
  18. # Row 3: Apply -R-90/90...
  19. gmt psrose $common0n -Y7.5c >> $ps
  20. # Row 4: Apply -R0/180...
  21. gmt psrose $common1n -Y5c >> $ps
  22. # col 2: vector plot
  23. # Row 1: Default plot
  24. gmt psrose $commonu -M0.5c+e+gorange+n1i+h0.5 -Y-20c -X9c >> $ps
  25. # Row 2: Apply -T
  26. gmt psrose $commonu -T -Y7.5c -M0.5c+b+e+gorange+n1i+h0.5 >> $ps
  27. # Row 3: Apply -R-90/90...
  28. gmt psrose $common0n -Y7.5c -M0.5c+e+gorange+n1i+h0.5 >> $ps
  29. # Row 4: Apply -R0/180...
  30. #gmt psrose $common1n -Y5c -M0.5c+e+gorange+n1i >> $ps
  31. gmt psrose $common1n -Y5c -M+ >> $ps
  32. # Finalize
  33. 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...