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

tworegions.sh 1.2 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
  1. #!/usr/bin/env bash
  2. # The given vector (0,10) has length 10. So a length of 10 is mapped to a length on the plot
  3. # psvelo: Scale 0.1i should yield a 1i long vector
  4. # grdvector: Scale 0.1i should yield a 1i long vector. However, until we fix things, scales
  5. # for geographic vectors are only given as data units / km, and then the length in km is mapped
  6. # to plot lengths which will vary with projection and location. Hence the blue vectors plotted
  7. # by grdvector have different plot lengths despite both having the same user length of 10.
  8. # Will update this test to supply an original once we fix it.
  9. # 22-JUL-2018: Fixed and uploaded an original.
  10. ps=tworegions.ps
  11. echo 0 0 0 10 1 1 0 > t.txt
  12. gmt xyz2grd -R-1/1/-1/1 -I30m -Gu.grd t.txt
  13. gmt xyz2grd -R -I30m -Gv.grd t.txt -i0,1,3
  14. gmt psvelo t.txt -JM3i -R-2/2/-2/2 -Se0.1i/0.95/12 -A9p+e -W1.5p,red -P -Bafg1 -BWSne -K > $ps
  15. gmt grdvector u.grd v.grd -R -J -O -K -Q0.1i+e -Gblue -W1p,blue -Si0.1i -Bafg1 -BwSne --MAP_VECTOR_SHAPE=0.2 -X3.25i >> $ps
  16. gmt psvelo t.txt -J -R-1/1/-1/1 -Se0.1i/0.95/12 -A9p+e -W1.5p,red -O -Bafg1 -BWSne -K -X-3.25i -Y3.75i >> $ps
  17. gmt grdvector u.grd v.grd -R -J -O -Q0.1i+e -Gblue -W1p,blue -Si0.1i -Bafg1 -BwSne --MAP_VECTOR_SHAPE=0.2 -X3.25i >> $ps
Tip!

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

Comments

Loading...