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

psimage.sh 920 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
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
  1. #!/usr/bin/env bash
  2. #
  3. ps=psimage.ps
  4. cat > tt.in <<%
  5. 0 0
  6. 1 0 +fwhite+bblack
  7. 0 1 +fblack+b-
  8. 1 1 +f-+bblack
  9. 0 2 +fwhite+b-
  10. 1 2 +f-+bwhite
  11. 0 3 +fred+b-
  12. 1 3 +f-+bred
  13. 0 4 +fred+byellow
  14. 1 4 +fyellow+bred
  15. %
  16. gmt psxy -R0/3/0/5 -Jx1.5i -Gp@circuit.png+r128 -P -K > $ps <<%
  17. 0 0
  18. 2 0
  19. 3 1
  20. 3 4
  21. 2 5
  22. 0 5
  23. %
  24. $AWK '{ x0=$1;x1=x0+1;y0=$2;y1=y0+1;c=$3; \
  25. printf "> -Gp10+r80%s\n%i %i\n%i %i\n%i %i\n",c,x0,y0,x1,y1,x0,y1 ; \
  26. printf "> -GP10+r80%s\n%i %i\n%i %i\n%i %i\n",c,x0,y0,x1,y1,x1,y0}' < tt.in \
  27. | gmt psxy -R -J -O -K >> $ps
  28. gmt psxy -R -J -O -K <<% >> $ps
  29. > -Gyellow
  30. 2 4
  31. 2.5 4
  32. 2.5 4.5
  33. > -Gred -W2p,blue
  34. 2 4
  35. 2.5 4.5
  36. 2 4.5
  37. %
  38. $AWK '{ x0=$1+0.5;y0=$2+0.5;c=$3; \
  39. printf "%g %g BR p%s\n",x0,y0,c ; \
  40. printf "%g %g TL P%s\n",x0,y0,c}' < tt.in \
  41. | gmt pstext -F+f7p,Helvetica-Bold,purple+j -R -J -O -K >> $ps
  42. echo 2.5 2.5 | gmt psxy -R -J -O -K -Ss1i -Gp10+fred+b-+r80 >> $ps
  43. echo 2.5 1.5 | gmt psxy -R -J -O -Ss1i -Gp10+r80 >> $ps
Tip!

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

Comments

Loading...