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

rotrectangle.sh 1003 B

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
  1. #!/usr/bin/env bash
  2. #
  3. # Test that gmt psxy properly plots rotatable rectangles -Sj and -SJ
  4. ps=rotrectangle.ps
  5. # Bottom case tests -SJ with azimuths and dimensions in km
  6. cat << EOF > tt.rects.d
  7. -65 15 90 500 200
  8. -70 20 0 500 200
  9. -80 25 70 500 300
  10. EOF
  11. gmt psxy -R270/20/305/25r -JOc280/25.5/22/69/4i -P -B10g5 -BWSne -SJ tt.rects.d -Gred -W0.25p,green -K > $ps
  12. gmt psxy -R -J -O -K -Sc0.05i tt.rects.d -G0 >> $ps
  13. # Middle case tests -Sj with angles and dimensions in inches (hence trailing i)
  14. cat << EOF > tt.rects.d
  15. -75 15 0 1 0.5
  16. -70 20 30 1 0.5
  17. -80 25 90 0.5 0.2
  18. EOF
  19. gmt psxy -R -J -O -K -B10g5 -BWSne -Sji tt.rects.d -Gblue -W0.25p,green -Y3i >> $ps
  20. gmt psxy -R -J -O -K -Sc0.05i tt.rects.d -G0 >> $ps
  21. # Top case is just Cartesian case where we pass angle and dimensions in -R units
  22. cat << EOF > tt.rects.d
  23. 0 0 30 5 2
  24. 10 10 70 7 1
  25. 20 0 90 6 3
  26. EOF
  27. gmt psxy -R-10/25/-5/15 -Jx0.15i -O -K -B10g5 -BWSne -SJ tt.rects.d -Gbrown -W0.25p,green -Y3i >> $ps
  28. gmt psxy -R -J -O -Sc0.05i tt.rects.d -G0 >> $ps
Tip!

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

Comments

Loading...