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

gallo.sh 667 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
  1. #!/usr/bin/env bash
  2. # Test rectangular EPS symbol in psxy
  3. ps=gallo.ps
  4. # Get the height of EPS file symbol relative to width
  5. epsfile=`gmt which -Gl @gallo.eps`
  6. scale=`grep "%%HiResBoundingBox" $epsfile | awk '{print ($5-$3)/($4-$2)}'`
  7. cat << EOF > chicks.txt
  8. -23 34 4c
  9. -35 15 5c
  10. -10 10 1i
  11. -15 55 3i
  12. -40 65 2i
  13. EOF
  14. gmt psxy -Skgallo -R-45/0/0/70 -JX15c/0 -B5 -BWSen -P -K chicks.txt -Xc > $ps
  15. awk '{printf "%s %s %s %g%s\n", $1, $2, $3, substr($3,1,1)*'"$scale"', substr($3,2,1)}' chicks.txt > r.txt
  16. gmt psxy -R -J -O -K r.txt -Sr -Wfaint,blue >> $ps
  17. gmt psxy -R -J -O -K chicks.txt -S+4i -Wfaint,red >> $ps
  18. gmt psxy -R -J -O chicks.txt -Sc0.1i -Gyellow -Wthin >> $ps
Tip!

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

Comments

Loading...