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

wrapper.sh 1.0 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
  1. #!/usr/bin/env bash
  2. # GMT_KNOWN_FAILURE
  3. # Examples of how large polygons (> 180 degree range) clipped by near-global regions
  4. # sometimes fails the inside/outside area tests.
  5. # There is not yet a orig to compare but it fails.
  6. ps=wrapper.ps
  7. # bad1 fails as the filling is the opposite of expected.
  8. # This polygon has 210 degrees longitudinal extent
  9. # When not clipped (top region plot) it works
  10. cat << EOF > bad1.txt
  11. 90 0
  12. 200 0
  13. 240 0
  14. 285 0
  15. 300 0
  16. 300 -40
  17. 285 -40
  18. 240 -40
  19. 200 -40
  20. 90 -40
  21. 90 0
  22. EOF
  23. # bad2 is clipped, filled, and outlined correctly. It
  24. # has a shorter extent than bad1 (40 degrees).
  25. cat << EOF > bad2.txt
  26. 90 20
  27. 130 20
  28. 130 50
  29. 90 50
  30. 90 20
  31. EOF
  32. # A region that fails
  33. gmt psxy -R-110/120/-60/60 -JM6i -Glightred -P -Baf -K bad1.txt -A -Xc > $ps
  34. gmt psxy -R -J -Glightblue -O -K bad2.txt -A >> $ps
  35. gmt psxy -R -J -O -K -W1p bad1.txt bad2.txt -A >> $ps
  36. # A region that works
  37. gmt psxy -R80/310/-60/60 -J -Glightred -O -Baf -K bad1.txt -A -Y5i >> $ps
  38. gmt psxy -R -J -Glightblue -O -K bad2.txt -A >> $ps
  39. gmt psxy -R -J -O -W1p bad1.txt bad2.txt -A >> $ps
Tip!

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

Comments

Loading...