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

cartsegmentize.sh 1.5 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
  1. #!/usr/bin/env bash
  2. # Test segmentizing option -F in psxy with Cartesian data
  3. ps=cartsegmentize.ps
  4. function plotpts
  5. { # Plots the two data tables and places given text
  6. gmt psxy -R -J -O -K -Sc0.2c -Ggreen -Wfaint t1.txt
  7. gmt psxy -R -J -O -K -Sc0.2c -Gblue -Wfaint t2.txt
  8. gmt pstext -R -J -O -K -F+cTL+jTL+f12p+t"$*" -Dj0.05i
  9. }
  10. cat << EOF > t1.txt
  11. 10 10
  12. 48 15
  13. 28 20
  14. >
  15. 40 40
  16. 30 5
  17. 5 15
  18. EOF
  19. cat << EOF > t2.txt
  20. 7 20
  21. 29 11
  22. 8 4
  23. EOF
  24. scl=0.06i
  25. # Show the data and its natural connectivity
  26. gmt psxy -R0/50/0/45 -Jx${scl} -P -Ba10 -BWSne -W0.25p,- t[12].txt -K > $ps
  27. plotpts TWO DATA TABLES >> $ps
  28. # Lines from dataset origin
  29. gmt psxy -R -J -Ba10 -BwSnE -W0.25p,- t[12].txt -O -K -X3.25i >> $ps
  30. gmt psxy -R -J -W1p t[12].txt -Fra -O -K >> $ps
  31. plotpts DATASET ORIGIN >> $ps
  32. # Lines from table origin
  33. gmt psxy -R -Jx${scl} -Ba10 -BWSne -W0.25p,- t[12].txt -O -K -X-3.25i -Y3.15i >> $ps
  34. gmt psxy -R -J -W1p t[12].txt -Frf -O -K >> $ps
  35. plotpts TABLE ORIGIN >> $ps
  36. # Lines from segment origin
  37. gmt psxy -R -J -Ba10 -BwSnE -W0.25p,- t[12].txt -O -K -X3.25i >> $ps
  38. gmt psxy -R -J -W1p t[12].txt -Frs -O -K >> $ps
  39. plotpts SEGMENT ORIGIN >> $ps
  40. # Lines from fixed origin
  41. gmt psxy -R -J -Ba10 -BWSne -W0.25p,- t[12].txt -O -K -X-3.25i -Y3.15i >> $ps
  42. gmt psxy -R -J -W1p t[12].txt -Fr10/35 -O -K >> $ps
  43. plotpts FIXED ORIGIN >> $ps
  44. echo 10 35 | gmt psxy -R -J -O -K -Sa0.4c -Gred -Wfaint >> $ps
  45. # Lines for network
  46. gmt psxy -R -J -Ba10 -BwSnE -W0.25p,- t[12].txt -O -K -X3.25i >> $ps
  47. gmt psxy -R -J -W1p t[12].txt -Fna -O -K >> $ps
  48. plotpts NETWORK >> $ps
  49. 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...