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

3dbars.sh 702 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
  1. #!/usr/bin/env bash
  2. # Show placements of columns on a variable surface
  3. ps=3dbars.ps
  4. gmt grdmath -R0/10E/0/10N -I1 X Y MUL = t.nc
  5. gmt makecpt -Cjet -T0/100 > t.cpt
  6. # Create a few x,y,z
  7. cat << EOF > t.txt
  8. 2 2 70
  9. 5 3 20
  10. 1 8 100
  11. 8 8 30
  12. 3 9 50
  13. 8 2 45
  14. EOF
  15. # Use z as base and add bar height to base via +B
  16. gmt grdtrack -Gt.nc t.txt > junk.txt
  17. gmt grdview t.nc -Ct.cpt -Qi100 -JM4i -JZ1.5i -R0/10/0/10/0/150 -p155/35 -P -Baf -Bzaf -BWSNEZ+b -K -X1.5i > $ps
  18. gmt psxyz -R -J -JZ -O -K junk.txt -So0.2i+B -Gred -W0.25p -p >> $ps
  19. # Show same columns on a flat surface
  20. gmt grdimage t.nc -Ct.cpt -J -JZ -R -p -O -Baf -Bzaf -BWSNEZ+b -K -Y4.5i >> $ps
  21. gmt psxyz -R -J -JZ -O t.txt -So0.2i+b0 -Gred -W0.25p -p >> $ps
Tip!

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

Comments

Loading...