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_scales.sh 1.4 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
  1. #!/usr/bin/env bash
  2. # Test that scales and inverse scales given to grdvector work the same for all units
  3. # Create a data set with a unit vector data length and then plot that to give the
  4. # plot lengths of 1 inch, 2.5 cm, or 72 points via direct or inverse scales. These
  5. # should all be about 2.5-2.54 cm long regardless of how we specified the scales.
  6. arg="-Q1c+e -Wthickest,black -Gred"
  7. gmt begin vec_scales ps
  8. gmt set MAP_FRAME_TYPE plain
  9. echo 0 0 90 | gmt xyz2grd -R-3/3/-3/3 -I3 -Ga.nc
  10. echo 0 0 1 | gmt xyz2grd -R-3/3/-3/3 -I3 -Gr.nc
  11. gmt subplot begin 3x2 -Fs6c -Sct -Srl -Bafg1 -M1c -R-3/3/-3/3 -JX6c -A+jBR+o0.5c+gwhite+p1p
  12. gmt subplot set 0 -A"-S1i" # 1 data unit per inch = 1 inch per data unit = 1 inch length
  13. gmt grdvector r.nc a.nc -A -S1i $arg
  14. gmt subplot set 1 -A"-Si1i" # 1 inch per data unit = 1 inch length
  15. gmt grdvector r.nc a.nc -A -Si1i $arg
  16. gmt subplot set 2 -A"-S0.4c" # 0.4 data unit per cm = 2.5 cm per data unit ~ 1 inch length
  17. gmt grdvector r.nc a.nc -A -S0.4c $arg
  18. gmt subplot set 3 -A"-Si2.5c" # 2.5 cm per data unit ~ 1 inch length
  19. gmt grdvector r.nc a.nc -A -Si2.5c $arg
  20. gmt subplot set 4 -A"-S0.01388p" # 0.01388 data unit per point = 72 points per data unit = 1 inch length
  21. gmt grdvector r.nc a.nc -A -S0.01388p $arg
  22. gmt subplot set 5 -A"-S72p" # 72 points per data unit = 1 inch length
  23. gmt grdvector r.nc a.nc -A -Si72p $arg
  24. gmt subplot end
  25. gmt end show
Tip!

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

Comments

Loading...