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

vec_choice.sh 1.6 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
  1. #!/usr/bin/env bash
  2. # Demonstrate GMT 4 and GMT5+ vectors. Derived from issue #1183
  3. ps=vec_choice.ps
  4. cat << EOF > t.txt
  5. -107.059013 34.266248 0.0063771 157.8143 2i
  6. -106.982134 34.253915 0.0058731 174.0829 2i
  7. -107.000000 34.000000 0.0068731 74.0829 1i
  8. EOF
  9. gmt makecpt -Cjet -T0.005/0.007 > t.cpt
  10. # Modern vector, filled head, same cpt for pen and fill
  11. gmt psxy -R-107:30/-106:30/33:30/34:30 -JM3i -P -Baf -BWSne -Sx0.1i -W0.5p t.txt -K > $ps
  12. gmt psxy -R -J -O -K -SV0.2i+e -W2p+c -Ct.cpt t.txt >> $ps
  13. gmt pstext -R -J -O -K -F+f12p+cBL+t"-SV0.2i+e -W2p+c -Ct.cpt" -Dj0.1i >> $ps
  14. gmt pstext -R -J -O -K -F+f16p+cTL+t"GMT5-6" -Dj0.1i >> $ps
  15. # Modern vector, filled circle as head at start, same cpt for pen and fill
  16. gmt psxy -R -J -O -Baf -BWSne -Sx0.1i -W0.5p t.txt -K -X3.75i >> $ps
  17. gmt psxy -R -J -O -K -SV0.2i+bc -W2p+c -Ct.cpt t.txt >> $ps
  18. gmt pstext -R -J -O -K -F+f12p+cBL+t"-SV0.2i+bc -W2p+c -Ct.cpt" -Dj0.1i >> $ps
  19. gmt pstext -R -J -O -K -F+f16p+cTL+t"GMT5-6" -Dj0.1i >> $ps
  20. # Old-style vector requires old-style arguments
  21. gmt psxy -R -J -O -Baf -BWSne -Sx0.1i -W0.5p t.txt -K -X-3.75i -Y4.25i >> $ps
  22. gmt psxy -R -J -O -K -SV0.03i/0.12i/0.1i -W0.25p -Ct.cpt t.txt >> $ps
  23. gmt pstext -R -J -O -K -F+f12p+cBL+t"-SV0.03i/0.12i/0.1i -W0.25p -Ct.cpt" -Dj0.1i >> $ps
  24. gmt pstext -R -J -O -K -F+f16p+cTL+t"GMT2-6" -Dj0.1i >> $ps
  25. # Modern vector, filled head at end via cpt but fixed pen color
  26. gmt psxy -R -J -O -Baf -BWSne -Sx0.1i -W0.5p t.txt -K -X3.75i >> $ps
  27. gmt psxy -R -J -O -K -SV0.12i+e+a90 -W2p+cf -Ct.cpt t.txt >> $ps
  28. gmt pstext -R -J -O -K -F+f12p+cBL+t"-SV0.12i+e+a90 -W2p+cf -Ct.cpt" -Dj0.1i >> $ps
  29. gmt pstext -R -J -O -F+f16p+cTL+t"GMT5-6" -Dj0.1i >> $ps
Tip!

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

Comments

Loading...