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 1.0 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
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
46
47
48
49
50
51
  1. #!/bin/bash
  2. # $id: $
  3. #
  4. ps=psimage.ps
  5. . ../functions.sh
  6. header "Test psimage with different pattern options"
  7. cat > $$.in <<%
  8. 0 0
  9. 1 0 :FwhiteBblack
  10. 0 1 :FblackB-
  11. 1 1 :F-Bblack
  12. 0 2 :FwhiteB-
  13. 1 2 :F-Bwhite
  14. 0 3 :FredB-
  15. 1 3 :F-Bred
  16. 0 4 :FredByellow
  17. 1 4 :FyellowBred
  18. %
  19. psxy -R0/3/0/5 -Jx1.5i -Gp128/../../doc/examples/ex16/circuit.ras -P -K > $ps <<%
  20. 0 0
  21. 2 0
  22. 3 1
  23. 3 4
  24. 2 5
  25. 0 5
  26. %
  27. awk '{ x0=$1;x1=x0+1;y0=$2;y1=y0+1;c=$3; \
  28. printf "> -Gp80/10%s\n%i %i\n%i %i\n%i %i\n",c,x0,y0,x1,y1,x0,y1 ; \
  29. printf "> -GP80/10%s\n%i %i\n%i %i\n%i %i\n",c,x0,y0,x1,y1,x1,y0}' < $$.in \
  30. | psxy -R -J -O -K >> $ps
  31. psxy -R -J -O -K <<% >> $ps
  32. > -Gyellow
  33. 2 4
  34. 2.5 4
  35. 2.5 4.5
  36. > -Gred -W2p,blue
  37. 2 4
  38. 2.5 4.5
  39. 2 4.5
  40. %
  41. awk '{ x0=$1+0.5;y0=$2+0.5;c=$3; \
  42. printf "%g %g BR p%s\n",x0,y0,c ; \
  43. printf "%g %g TL P%s\n",x0,y0,c}' < $$.in \
  44. | pstext -F+f7p,Helvetica-Bold,purple+j -R -J -O -K >> $ps
  45. psimage -E80 -C3i/3i/BL ../../share/pattern/ps_pattern_10.ras -Gfred -Gb- -O -K >> $ps
  46. psimage -E80 -C3i/3i/TL ../../share/pattern/ps_pattern_10.ras -O >> $ps
  47. rm -f $$.in
  48. pscmp
Tip!

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

Comments

Loading...