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

grdmix.sh 836 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
  1. #!/usr/bin/env bash
  2. #
  3. # Testing gmt grdmix capabilities
  4. ps=grdmix.ps
  5. # Testing grdmix
  6. gmt grdmath -R0/5/0/5 -I0.1 -r X = x.grd
  7. gmt grdmath -R0/5/0/5 -I0.1 -r Y = y.grd
  8. echo "0 red 10 red" > t.cpt
  9. gmt grdimage x.grd -Ct.cpt -Jx1 -Ared.png
  10. echo "0 blue 10 blue" > t.cpt
  11. gmt grdimage y.grd -Ct.cpt -Jx1 -Ablue.png
  12. gmt grdmath -R0/5/0/5 -I0.1 -r Y X MUL DUP UPPER DIV = w.grd
  13. echo "0 black 1 white" > t.cpt
  14. gmt grdimage w.grd -Ct.cpt -Jx1 -Aalpha.png
  15. gmt grdmix red.png blue.png -Walpha.png -Gmix.png
  16. gmt psimage mix.png -Dx0/0+w5i -P -B0 -K -X1.75i > $ps
  17. gmt psimage red.png -Dx0/0+w1.5i -O -K -B0 -Y5.5i >> $ps
  18. gmt psimage blue.png -Dx0/0+w1.5i -O -K -B0 -X1.75i >> $ps
  19. gmt psimage alpha.png -Dx0/0+w1.5i -O -K -B0 -X1.75i >> $ps
  20. gmt grdmix mix.png -Aalpha.png -Gnew.png
  21. gmt psimage new.png -Dx0/0+w5i/1.5i -O -B0 -Y1.75i -X-3.5i >> $ps
Tip!

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

Comments

Loading...