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

transp_scale.sh 1.1 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
  1. #!/usr/bin/env bash
  2. # Test CPTs with various levels of transparency
  3. ps=transp_scale.ps
  4. # 1. Discrete CPT with no transparenty
  5. gmt makecpt -Cturbo -T-4000/-1000/500 -D > t.cpt
  6. gmt psscale -Ct.cpt -R0/10/0/10 -JX15c -Y26c -Baf -Bx+l"Discrete CPT No Slices Transparent" -P -K > $ps
  7. # 2. Discrete CPT with all transparent colors
  8. gmt makecpt -A50 -Cturbo -T-4000/-1000/500 -D > t.cpt
  9. gmt psscale -Ct.cpt -R -J -Y-5c -Baf -O -K -Bx+l"Discrete CPT All Slices Transparent" >> $ps
  10. # 3. Continuous CPT with no transparency
  11. gmt makecpt -Cturbo -T-4000/-1000 -D > t.cpt
  12. gmt psscale -Ct.cpt -R -J -Y-5c -O -K -Baf -Bx+l"Continuous CPT No Slices Transparent" >> $ps
  13. # 4. Continuous CPT with all transparent colors
  14. gmt makecpt -A50 -Cturbo -T-4000/-1000 -D > t.cpt
  15. gmt psscale -Ct.cpt -R -J -Y-5c -O -K -Baf -Bx+l"Continuous CPT All Slices Transparent" >> $ps
  16. # 5. Discrete CPT with some transparent colors
  17. gmt makecpt -Cturbo -T-4000/-1000/500 -D | awk '{if (NF == 5 && NR%2) {printf "%s\t%s@50\t%s\t%s@50\t%s\n", $1, $2, $3, $4, $5} else {print $0}}'> t.cpt
  18. gmt psscale -Ct.cpt -R -J -Y-5c -O -Baf -Bx+l"Discrete CPT Odd Slices Transparent" >> $ps
Tip!

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

Comments

Loading...