psfix-gnuplot 30 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837
  1. #!/usr/bin/env perl
  2. #
  3. # Fix line type and color of gnuplot-generated PostScript files.
  4. # Copyright (c) 2006-2015, Hiroyuki Ohsaki.
  5. # All rights reserved.
  6. #
  7. # $Id: psfix-gnuplot,v 1.15 2023/03/30 08:33:22 ohsaki Exp $
  8. #
  9. use File::Basename;
  10. use Getopt::Std;
  11. use strict;
  12. my $COLOR_FACTOR = 1.00;
  13. my %COLOR_MAP = (
  14. 0 => [qw(0.9 0 0)], # red
  15. 1 => [qw(0.2 0.7 0)], # green
  16. 2 => [qw(0 0.1 0.9)], # blue
  17. 3 => [qw(0 0.8 0.8)], # cyan
  18. 4 => [qw(0.6 0 0.9)], # purple
  19. 5 => [qw(1 0.7 0)], # orange
  20. 6 => [qw(0.5 0.5 0.5)], # gray
  21. );
  22. my %POINT_MAP = (
  23. 'Pnt' => 'Pnt',
  24. 'Pls' => 'CircleF',
  25. 'Crs' => 'BoxF',
  26. 'Star' => 'DiaF',
  27. 'Box' => 'TriUF',
  28. 'BoxF' => 'TriDF',
  29. 'Circle' => 'Circle',
  30. 'CircleF' => 'Box',
  31. 'TriU' => 'Dia',
  32. 'TriUF' => 'TriU',
  33. 'TriD' => 'TriD'
  34. );
  35. sub usage {
  36. my $prog = basename($0);
  37. die <<EOF;
  38. usage: $prog [-e] [file...]
  39. -e change line type/color of errorbars
  40. EOF
  41. }
  42. our $opt_e;
  43. getopts('e') or usage();
  44. my $force_errorbar = $opt_e;
  45. my @buf;
  46. my $with_errorbar = 0;
  47. while (<>) {
  48. chomp;
  49. push @buf, $_;
  50. # detect if the plot has errorbars; if the second line has a
  51. # legend, it implies that the plot does not have errorbars
  52. if ( /^% Begin plot #2/ .. /^% End plot #2/ ) {
  53. $with_errorbar = 0 if /MRshow/;
  54. }
  55. }
  56. $with_errorbar = 1 if $force_errorbar;
  57. if ($with_errorbar) {
  58. # FIXME: with errorbars, only 9 lines are supported
  59. %POINT_MAP = (
  60. 'Pnt' => 'Pnt',
  61. 'Pls' => 'CircleF',
  62. 'Crs' => 'CircleF',
  63. 'Star' => 'BoxF',
  64. 'Box' => 'BoxF',
  65. 'BoxF' => 'DiaF',
  66. 'Circle' => 'DiaF',
  67. 'CircleF' => 'TriUF',
  68. 'TriU' => 'TriUF',
  69. 'TriUF' => 'TriDF',
  70. 'TriD' => 'TriDF',
  71. 'TriDF' => 'Circle',
  72. 'Dia' => 'Circle',
  73. 'DiaF' => 'Box',
  74. 'Pent' => 'Box',
  75. 'PentF' => 'Dia',
  76. 'C0' => 'Dia'
  77. );
  78. }
  79. for (@buf) {
  80. # line color
  81. if (m:^/LC(\w+) \{([\d.]+) ([\d.]+) ([\d.]+)\} def$:) {
  82. my ( $color_number, $r, $g, $b ) = ( $1, $2, $3, $4 );
  83. my $n = $color_number;
  84. if ( $with_errorbar and $n > 0 ) {
  85. $n = int( $color_number / 2 );
  86. }
  87. if ( exists $COLOR_MAP{$n} ) {
  88. ( $r, $g, $b ) = map { $_ * $COLOR_FACTOR } @{ $COLOR_MAP{$n} };
  89. }
  90. $_ = "/LC$color_number {$r $g $b} def";
  91. }
  92. # point data
  93. if (/^([\d.]+) ([\d.]+) (\w+)$/) {
  94. my ( $x, $y, $pnt ) = ( $1, $2, $3 );
  95. if ( exists $POINT_MAP{$pnt} ) {
  96. $_ = "$x $y $POINT_MAP{$pnt}";
  97. }
  98. }
  99. print "$_\n";
  100. }
  101. __END__
  102. gnuplot-4.0.0/term/post.trm:
  103. "/LT0 { PL [] 1 0 0 DL } def\n",
  104. "/LT1 { PL [4 dl 2 dl] 0 1 0 DL } def\n",
  105. "/LT2 { PL [2 dl 3 dl] 0 0 1 DL } def\n",
  106. "/LT3 { PL [1 dl 1.5 dl] 1 0 1 DL } def\n",
  107. "/LT4 { PL [5 dl 2 dl 1 dl 2 dl] 0 1 1 DL } def\n",
  108. "/LT5 { PL [4 dl 3 dl 1 dl 3 dl] 1 1 0 DL } def\n",
  109. "/LT6 { PL [2 dl 2 dl 2 dl 4 dl] 0 0 0 DL } def\n",
  110. "/LT7 { PL [2 dl 2 dl 2 dl 2 dl 2 dl 4 dl] 1 0.3 0 DL } def\n",
  111. "/LT8 { PL [2 dl 2 dl 2 dl 2 dl 2 dl 2 dl 2 dl 4 dl] 0.5 0.5 0.5 DL } def\n",
  112. /* postscript point routines */
  113. TERM_PUBLIC void
  114. PS_point(x,y,number)
  115. unsigned int x,y;
  116. int number;
  117. {
  118. static const char GPFAR * GPFAR pointFNS[] = {
  119. "Pnt", "Pls", "Crs", "Star",
  120. "Box", "BoxF", "Circle", "CircleF",
  121. "TriU", "TriUF", "TriD", "TriDF",
  122. "Dia", "DiaF", "Pent", "PentF",
  123. "C0", "C1", "C2", "C3",
  124. "C4", "C5", "C6", "C7",
  125. "C8", "C9", "C10", "C11",
  126. "C12", "C13", "C14", "C15",
  127. "S0", "S1", "S2", "S3",
  128. "S4", "S5", "S6", "S7",
  129. "S8", "S9", "S10", "S11",
  130. "S12", "S13", "S14", "S15",
  131. "D0", "D1", "D2", "D3",
  132. "D4", "D5", "D6", "D7",
  133. "D8", "D9", "D10", "D11",
  134. "D12", "D13", "D14", "D15",
  135. "BoxE", "CircE", "TriUE", "TriDE",
  136. "DiaE", "PentE", "BoxW", "CircW",
  137. "TriUW", "TriDW", "DiaW", "PentW"
  138. };
  139. gnuplot-4.2.2/term/post.trm:
  140. % Default Line colors
  141. /LCw {1 1 1} def
  142. /LCb {0 0 0} def
  143. /LCa {0 0 0} def
  144. /LC0 {1 0 0} def
  145. /LC1 {0 1 0} def
  146. /LC2 {0 0 1} def
  147. /LC3 {1 0 1} def
  148. /LC4 {0 1 1} def
  149. /LC5 {1 1 0} def
  150. /LC6 {0 0 0} def
  151. /LC7 {1 0.3 0} def
  152. /LC8 {0.5 0.5 0.5} def
  153. % Default Line Types
  154. /LTw {PL [] 1 setgray} def
  155. /LTb {BL [] LCb DL} def
  156. /LTa {AL [1 udl mul 2 udl mul] 0 setdash LCa setrgbcolor} def
  157. /LT0 {PL [] LC0 DL} def
  158. /LT1 {PL [4 dl1 2 dl2] LC1 DL} def
  159. /LT2 {PL [2 dl1 3 dl2] LC2 DL} def
  160. /LT3 {PL [1 dl1 1.5 dl2] LC3 DL} def
  161. /LT4 {PL [6 dl1 2 dl2 1 dl1 2 dl2] LC4 DL} def
  162. /LT5 {PL [3 dl1 3 dl2 1 dl1 3 dl2] LC5 DL} def
  163. /LT6 {PL [2 dl1 2 dl2 2 dl1 6 dl2] LC6 DL} def
  164. /LT7 {PL [1 dl1 2 dl2 6 dl1 2 dl2 1 dl1 2 dl2] LC7 DL} def
  165. /LT8 {PL [2 dl1 2 dl2 2 dl1 2 dl2 2 dl1 2 dl2 2 dl1 4 dl2] LC8 DL} def
  166. /Pnt {stroke [] 0 setdash gsave 1 setlinecap M 0 0 V stroke grestore} def
  167. /Dia {stroke [] 0 setdash 2 copy vpt add M
  168. hpt neg vpt neg V hpt vpt neg V
  169. hpt vpt V hpt neg vpt V closepath stroke
  170. Pnt} def
  171. /Pls {stroke [] 0 setdash vpt sub M 0 vpt2 V
  172. currentpoint stroke M
  173. hpt neg vpt neg R hpt2 0 V stroke
  174. } def
  175. /Box {stroke [] 0 setdash 2 copy exch hpt sub exch vpt add M
  176. 0 vpt2 neg V hpt2 0 V 0 vpt2 V
  177. hpt2 neg 0 V closepath stroke
  178. Pnt} def
  179. /Crs {stroke [] 0 setdash exch hpt sub exch vpt add M
  180. hpt2 vpt2 neg V currentpoint stroke M
  181. hpt2 neg 0 R hpt2 vpt2 V stroke} def
  182. /TriU {stroke [] 0 setdash 2 copy vpt 1.12 mul add M
  183. hpt neg vpt -1.62 mul V
  184. hpt 2 mul 0 V
  185. hpt neg vpt 1.62 mul V closepath stroke
  186. Pnt} def
  187. /Star {2 copy Pls Crs} def
  188. /BoxF {stroke [] 0 setdash exch hpt sub exch vpt add M
  189. 0 vpt2 neg V hpt2 0 V 0 vpt2 V
  190. hpt2 neg 0 V closepath fill} def
  191. /TriUF {stroke [] 0 setdash vpt 1.12 mul add M
  192. hpt neg vpt -1.62 mul V
  193. hpt 2 mul 0 V
  194. hpt neg vpt 1.62 mul V closepath fill} def
  195. /TriD {stroke [] 0 setdash 2 copy vpt 1.12 mul sub M
  196. hpt neg vpt 1.62 mul V
  197. hpt 2 mul 0 V
  198. hpt neg vpt -1.62 mul V closepath stroke
  199. Pnt} def
  200. /TriDF {stroke [] 0 setdash vpt 1.12 mul sub M
  201. hpt neg vpt 1.62 mul V
  202. hpt 2 mul 0 V
  203. hpt neg vpt -1.62 mul V closepath fill} def
  204. /DiaF {stroke [] 0 setdash vpt add M
  205. hpt neg vpt neg V hpt vpt neg V
  206. hpt vpt V hpt neg vpt V closepath fill} def
  207. /Pent {stroke [] 0 setdash 2 copy gsave
  208. translate 0 hpt M 4 {72 rotate 0 hpt L} repeat
  209. closepath stroke grestore Pnt} def
  210. /PentF {stroke [] 0 setdash gsave
  211. translate 0 hpt M 4 {72 rotate 0 hpt L} repeat
  212. closepath fill grestore} def
  213. /Circle {stroke [] 0 setdash 2 copy
  214. hpt 0 360 arc stroke Pnt} def
  215. /CircleF {stroke [] 0 setdash hpt 0 360 arc fill} def
  216. /C0 {BL [] 0 setdash 2 copy moveto vpt 90 450 arc} bind def
  217. /C1 {BL [] 0 setdash 2 copy moveto
  218. 2 copy vpt 0 90 arc closepath fill
  219. vpt 0 360 arc closepath} bind def
  220. /C2 {BL [] 0 setdash 2 copy moveto
  221. 2 copy vpt 90 180 arc closepath fill
  222. vpt 0 360 arc closepath} bind def
  223. /C3 {BL [] 0 setdash 2 copy moveto
  224. 2 copy vpt 0 180 arc closepath fill
  225. vpt 0 360 arc closepath} bind def
  226. /C4 {BL [] 0 setdash 2 copy moveto
  227. 2 copy vpt 180 270 arc closepath fill
  228. vpt 0 360 arc closepath} bind def
  229. /C5 {BL [] 0 setdash 2 copy moveto
  230. 2 copy vpt 0 90 arc
  231. 2 copy moveto
  232. 2 copy vpt 180 270 arc closepath fill
  233. vpt 0 360 arc} bind def
  234. /C6 {BL [] 0 setdash 2 copy moveto
  235. 2 copy vpt 90 270 arc closepath fill
  236. vpt 0 360 arc closepath} bind def
  237. /C7 {BL [] 0 setdash 2 copy moveto
  238. 2 copy vpt 0 270 arc closepath fill
  239. vpt 0 360 arc closepath} bind def
  240. /C8 {BL [] 0 setdash 2 copy moveto
  241. 2 copy vpt 270 360 arc closepath fill
  242. vpt 0 360 arc closepath} bind def
  243. /C9 {BL [] 0 setdash 2 copy moveto
  244. 2 copy vpt 270 450 arc closepath fill
  245. vpt 0 360 arc closepath} bind def
  246. /C10 {BL [] 0 setdash 2 copy 2 copy moveto vpt 270 360 arc closepath fill
  247. 2 copy moveto
  248. 2 copy vpt 90 180 arc closepath fill
  249. vpt 0 360 arc closepath} bind def
  250. /C11 {BL [] 0 setdash 2 copy moveto
  251. 2 copy vpt 0 180 arc closepath fill
  252. 2 copy moveto
  253. 2 copy vpt 270 360 arc closepath fill
  254. vpt 0 360 arc closepath} bind def
  255. /C12 {BL [] 0 setdash 2 copy moveto
  256. 2 copy vpt 180 360 arc closepath fill
  257. vpt 0 360 arc closepath} bind def
  258. /C13 {BL [] 0 setdash 2 copy moveto
  259. 2 copy vpt 0 90 arc closepath fill
  260. 2 copy moveto
  261. 2 copy vpt 180 360 arc closepath fill
  262. vpt 0 360 arc closepath} bind def
  263. /C14 {BL [] 0 setdash 2 copy moveto
  264. 2 copy vpt 90 360 arc closepath fill
  265. vpt 0 360 arc} bind def
  266. /C15 {BL [] 0 setdash 2 copy vpt 0 360 arc closepath fill
  267. vpt 0 360 arc closepath} bind def
  268. /Rec {newpath 4 2 roll moveto 1 index 0 rlineto 0 exch rlineto
  269. neg 0 rlineto closepath} bind def
  270. /Square {dup Rec} bind def
  271. /Bsquare {vpt sub exch vpt sub exch vpt2 Square} bind def
  272. /S0 {BL [] 0 setdash 2 copy moveto 0 vpt rlineto BL Bsquare} bind def
  273. /S1 {BL [] 0 setdash 2 copy vpt Square fill Bsquare} bind def
  274. /S2 {BL [] 0 setdash 2 copy exch vpt sub exch vpt Square fill Bsquare} bind def
  275. /S3 {BL [] 0 setdash 2 copy exch vpt sub exch vpt2 vpt Rec fill Bsquare} bind def
  276. /S4 {BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt Square fill Bsquare} bind def
  277. /S5 {BL [] 0 setdash 2 copy 2 copy vpt Square fill
  278. exch vpt sub exch vpt sub vpt Square fill Bsquare} bind def
  279. /S6 {BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt vpt2 Rec fill Bsquare} bind def
  280. /S7 {BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt vpt2 Rec fill
  281. 2 copy vpt Square fill Bsquare} bind def
  282. /S8 {BL [] 0 setdash 2 copy vpt sub vpt Square fill Bsquare} bind def
  283. /S9 {BL [] 0 setdash 2 copy vpt sub vpt vpt2 Rec fill Bsquare} bind def
  284. /S10 {BL [] 0 setdash 2 copy vpt sub vpt Square fill 2 copy exch vpt sub exch vpt Square fill
  285. Bsquare} bind def
  286. /S11 {BL [] 0 setdash 2 copy vpt sub vpt Square fill 2 copy exch vpt sub exch vpt2 vpt Rec fill
  287. Bsquare} bind def
  288. /S12 {BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt2 vpt Rec fill Bsquare} bind def
  289. /S13 {BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt2 vpt Rec fill
  290. 2 copy vpt Square fill Bsquare} bind def
  291. /S14 {BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt2 vpt Rec fill
  292. 2 copy exch vpt sub exch vpt Square fill Bsquare} bind def
  293. /S15 {BL [] 0 setdash 2 copy Bsquare fill Bsquare} bind def
  294. /D0 {gsave translate 45 rotate 0 0 S0 stroke grestore} bind def
  295. /D1 {gsave translate 45 rotate 0 0 S1 stroke grestore} bind def
  296. /D2 {gsave translate 45 rotate 0 0 S2 stroke grestore} bind def
  297. /D3 {gsave translate 45 rotate 0 0 S3 stroke grestore} bind def
  298. /D4 {gsave translate 45 rotate 0 0 S4 stroke grestore} bind def
  299. /D5 {gsave translate 45 rotate 0 0 S5 stroke grestore} bind def
  300. /D6 {gsave translate 45 rotate 0 0 S6 stroke grestore} bind def
  301. /D7 {gsave translate 45 rotate 0 0 S7 stroke grestore} bind def
  302. /D8 {gsave translate 45 rotate 0 0 S8 stroke grestore} bind def
  303. /D9 {gsave translate 45 rotate 0 0 S9 stroke grestore} bind def
  304. /D10 {gsave translate 45 rotate 0 0 S10 stroke grestore} bind def
  305. /D11 {gsave translate 45 rotate 0 0 S11 stroke grestore} bind def
  306. /D12 {gsave translate 45 rotate 0 0 S12 stroke grestore} bind def
  307. /D13 {gsave translate 45 rotate 0 0 S13 stroke grestore} bind def
  308. /D14 {gsave translate 45 rotate 0 0 S14 stroke grestore} bind def
  309. /D15 {gsave translate 45 rotate 0 0 S15 stroke grestore} bind def
  310. /DiaE {stroke [] 0 setdash vpt add M
  311. hpt neg vpt neg V hpt vpt neg V
  312. hpt vpt V hpt neg vpt V closepath stroke} def
  313. /BoxE {stroke [] 0 setdash exch hpt sub exch vpt add M
  314. 0 vpt2 neg V hpt2 0 V 0 vpt2 V
  315. hpt2 neg 0 V closepath stroke} def
  316. /TriUE {stroke [] 0 setdash vpt 1.12 mul add M
  317. hpt neg vpt -1.62 mul V
  318. hpt 2 mul 0 V
  319. hpt neg vpt 1.62 mul V closepath stroke} def
  320. /TriDE {stroke [] 0 setdash vpt 1.12 mul sub M
  321. hpt neg vpt 1.62 mul V
  322. hpt 2 mul 0 V
  323. hpt neg vpt -1.62 mul V closepath stroke} def
  324. /PentE {stroke [] 0 setdash gsave
  325. translate 0 hpt M 4 {72 rotate 0 hpt L} repeat
  326. closepath stroke grestore} def
  327. /CircE {stroke [] 0 setdash
  328. hpt 0 360 arc stroke} def
  329. /Opaque {gsave closepath 1 setgray fill grestore 0 setgray closepath} def
  330. /DiaW {stroke [] 0 setdash vpt add M
  331. hpt neg vpt neg V hpt vpt neg V
  332. hpt vpt V hpt neg vpt V Opaque stroke} def
  333. /BoxW {stroke [] 0 setdash exch hpt sub exch vpt add M
  334. 0 vpt2 neg V hpt2 0 V 0 vpt2 V
  335. hpt2 neg 0 V Opaque stroke} def
  336. /TriUW {stroke [] 0 setdash vpt 1.12 mul add M
  337. hpt neg vpt -1.62 mul V
  338. hpt 2 mul 0 V
  339. hpt neg vpt 1.62 mul V Opaque stroke} def
  340. /TriDW {stroke [] 0 setdash vpt 1.12 mul sub M
  341. hpt neg vpt 1.62 mul V
  342. hpt 2 mul 0 V
  343. hpt neg vpt -1.62 mul V Opaque stroke} def
  344. /PentW {stroke [] 0 setdash gsave
  345. translate 0 hpt M 4 {72 rotate 0 hpt L} repeat
  346. Opaque stroke grestore} def
  347. /CircW {stroke [] 0 setdash
  348. hpt 0 360 arc Opaque stroke} def
  349. /BoxFill {gsave Rec 1 setgray fill grestore} def
  350. /Density {
  351. /Fillden exch def
  352. currentrgbcolor
  353. /ColB exch def /ColG exch def /ColR exch def
  354. /ColR ColR Fillden mul Fillden sub 1 add def
  355. /ColG ColG Fillden mul Fillden sub 1 add def
  356. /ColB ColB Fillden mul Fillden sub 1 add def
  357. ColR ColG ColB setrgbcolor} def
  358. /BoxColFill {gsave Rec PolyFill} def
  359. /PolyFill {gsave Density fill grestore grestore} def
  360. /h {rlineto rlineto rlineto gsave fill grestore} bind def
  361. gnuplot-5.0.5+dfsg1/term/post.trm:
  362. %
  363. % Gnuplot Prolog Version 5.1 (Oct 2015)
  364. %
  365. %/SuppressPDFMark true def
  366. %
  367. /M {moveto} bind def
  368. /L {lineto} bind def
  369. /R {rmoveto} bind def
  370. /V {rlineto} bind def
  371. /N {newpath moveto} bind def
  372. /Z {closepath} bind def
  373. /C {setrgbcolor} bind def
  374. /f {rlineto fill} bind def
  375. /g {setgray} bind def
  376. /Gshow {show} def % May be redefined later in the file to support UTF-8
  377. /vpt2 vpt 2 mul def
  378. /hpt2 hpt 2 mul def
  379. /Lshow {currentpoint stroke M 0 vshift R
  380. Blacktext {gsave 0 setgray textshow grestore} {textshow} ifelse} def
  381. /Rshow {currentpoint stroke M dup stringwidth pop neg vshift R
  382. Blacktext {gsave 0 setgray textshow grestore} {textshow} ifelse} def
  383. /Cshow {currentpoint stroke M dup stringwidth pop -2 div vshift R
  384. Blacktext {gsave 0 setgray textshow grestore} {textshow} ifelse} def
  385. /UP {dup vpt_ mul /vpt exch def hpt_ mul /hpt exch def
  386. /hpt2 hpt 2 mul def /vpt2 vpt 2 mul def} def
  387. /DL {Color {setrgbcolor Solid {pop []} if 0 setdash}
  388. {pop pop pop 0 setgray Solid {pop []} if 0 setdash} ifelse} def
  389. /BL {stroke userlinewidth 2 mul setlinewidth
  390. Rounded {1 setlinejoin 1 setlinecap} if} def
  391. /AL {stroke userlinewidth 2 div setlinewidth
  392. Rounded {1 setlinejoin 1 setlinecap} if} def
  393. /UL {dup gnulinewidth mul /userlinewidth exch def
  394. dup 1 lt {pop 1} if 10 mul /udl exch def} def
  395. /PL {stroke userlinewidth setlinewidth
  396. Rounded {1 setlinejoin 1 setlinecap} if} def
  397. 3.8 setmiterlimit
  398. % Classic Line colors (version 5.0)
  399. /LCw {1 1 1} def
  400. /LCb {0 0 0} def
  401. /LCa {0 0 0} def
  402. /LC0 {0.9 0 0} def
  403. /LC1 {0.2 0.7 0} def
  404. /LC2 {0 0.1 0.9} def
  405. /LC3 {0 0.8 0.8} def
  406. /LC4 {0.6 0 0.9} def
  407. /LC5 {1 0.7 0} def
  408. /LC6 {0.5 0.5 0.5} def
  409. /LC7 {1 0.3 0} def
  410. /LC8 {0.5 0.5 0.5} def
  411. % Default dash patterns (version 5.0)
  412. /LTB {BL [] LCb DL} def
  413. /LTw {PL [] 1 setgray} def
  414. /LTb {PL [] LCb DL} def
  415. /LTa {AL [1 udl mul 2 udl mul] 0 setdash LCa setrgbcolor} def
  416. /LT0 {PL [] LC0 DL} def
  417. /LT1 {PL [2 dl1 3 dl2] LC1 DL} def
  418. /LT2 {PL [1 dl1 1.5 dl2] LC2 DL} def
  419. /LT3 {PL [6 dl1 2 dl2 1 dl1 2 dl2] LC3 DL} def
  420. /LT4 {PL [1 dl1 2 dl2 6 dl1 2 dl2 1 dl1 2 dl2] LC4 DL} def
  421. /LT5 {PL [4 dl1 2 dl2] LC5 DL} def
  422. /LT6 {PL [1.5 dl1 1.5 dl2 1.5 dl1 1.5 dl2 1.5 dl1 6 dl2] LC6 DL} def
  423. /LT7 {PL [3 dl1 3 dl2 1 dl1 3 dl2] LC7 DL} def
  424. /LT8 {PL [2 dl1 2 dl2 2 dl1 6 dl2] LC8 DL} def
  425. /SL {[] 0 setdash} def
  426. /Pnt {stroke [] 0 setdash gsave 1 setlinecap M 0 0 V stroke grestore} def
  427. /Dia {stroke [] 0 setdash 2 copy vpt add M
  428. hpt neg vpt neg V hpt vpt neg V
  429. hpt vpt V hpt neg vpt V closepath stroke
  430. Pnt} def
  431. /Pls {stroke [] 0 setdash vpt sub M 0 vpt2 V
  432. currentpoint stroke M
  433. hpt neg vpt neg R hpt2 0 V stroke
  434. } def
  435. /Box {stroke [] 0 setdash 2 copy exch hpt sub exch vpt add M
  436. 0 vpt2 neg V hpt2 0 V 0 vpt2 V
  437. hpt2 neg 0 V closepath stroke
  438. Pnt} def
  439. /Crs {stroke [] 0 setdash exch hpt sub exch vpt add M
  440. hpt2 vpt2 neg V currentpoint stroke M
  441. hpt2 neg 0 R hpt2 vpt2 V stroke} def
  442. /TriU {stroke [] 0 setdash 2 copy vpt 1.12 mul add M
  443. hpt neg vpt -1.62 mul V
  444. hpt 2 mul 0 V
  445. hpt neg vpt 1.62 mul V closepath stroke
  446. Pnt} def
  447. /Star {2 copy Pls Crs} def
  448. /BoxF {stroke [] 0 setdash exch hpt sub exch vpt add M
  449. 0 vpt2 neg V hpt2 0 V 0 vpt2 V
  450. hpt2 neg 0 V closepath fill} def
  451. /TriUF {stroke [] 0 setdash vpt 1.12 mul add M
  452. hpt neg vpt -1.62 mul V
  453. hpt 2 mul 0 V
  454. hpt neg vpt 1.62 mul V closepath fill} def
  455. /TriD {stroke [] 0 setdash 2 copy vpt 1.12 mul sub M
  456. hpt neg vpt 1.62 mul V
  457. hpt 2 mul 0 V
  458. hpt neg vpt -1.62 mul V closepath stroke
  459. Pnt} def
  460. /TriDF {stroke [] 0 setdash vpt 1.12 mul sub M
  461. hpt neg vpt 1.62 mul V
  462. hpt 2 mul 0 V
  463. hpt neg vpt -1.62 mul V closepath fill} def
  464. /DiaF {stroke [] 0 setdash vpt add M
  465. hpt neg vpt neg V hpt vpt neg V
  466. hpt vpt V hpt neg vpt V closepath fill} def
  467. /Pent {stroke [] 0 setdash 2 copy gsave
  468. translate 0 hpt M 4 {72 rotate 0 hpt L} repeat
  469. closepath stroke grestore Pnt} def
  470. /PentF {stroke [] 0 setdash gsave
  471. translate 0 hpt M 4 {72 rotate 0 hpt L} repeat
  472. closepath fill grestore} def
  473. /Circle {stroke [] 0 setdash 2 copy
  474. hpt 0 360 arc stroke Pnt} def
  475. /CircleF {stroke [] 0 setdash hpt 0 360 arc fill} def
  476. /C0 {BL [] 0 setdash 2 copy moveto vpt 90 450 arc} bind def
  477. /C1 {BL [] 0 setdash 2 copy moveto
  478. 2 copy vpt 0 90 arc closepath fill
  479. vpt 0 360 arc closepath} bind def
  480. /C2 {BL [] 0 setdash 2 copy moveto
  481. 2 copy vpt 90 180 arc closepath fill
  482. vpt 0 360 arc closepath} bind def
  483. /C3 {BL [] 0 setdash 2 copy moveto
  484. 2 copy vpt 0 180 arc closepath fill
  485. vpt 0 360 arc closepath} bind def
  486. /C4 {BL [] 0 setdash 2 copy moveto
  487. 2 copy vpt 180 270 arc closepath fill
  488. vpt 0 360 arc closepath} bind def
  489. /C5 {BL [] 0 setdash 2 copy moveto
  490. 2 copy vpt 0 90 arc
  491. 2 copy moveto
  492. 2 copy vpt 180 270 arc closepath fill
  493. vpt 0 360 arc} bind def
  494. /C6 {BL [] 0 setdash 2 copy moveto
  495. 2 copy vpt 90 270 arc closepath fill
  496. vpt 0 360 arc closepath} bind def
  497. /C7 {BL [] 0 setdash 2 copy moveto
  498. 2 copy vpt 0 270 arc closepath fill
  499. vpt 0 360 arc closepath} bind def
  500. /C8 {BL [] 0 setdash 2 copy moveto
  501. 2 copy vpt 270 360 arc closepath fill
  502. vpt 0 360 arc closepath} bind def
  503. /C9 {BL [] 0 setdash 2 copy moveto
  504. 2 copy vpt 270 450 arc closepath fill
  505. vpt 0 360 arc closepath} bind def
  506. /C10 {BL [] 0 setdash 2 copy 2 copy moveto vpt 270 360 arc closepath fill
  507. 2 copy moveto
  508. 2 copy vpt 90 180 arc closepath fill
  509. vpt 0 360 arc closepath} bind def
  510. /C11 {BL [] 0 setdash 2 copy moveto
  511. 2 copy vpt 0 180 arc closepath fill
  512. 2 copy moveto
  513. 2 copy vpt 270 360 arc closepath fill
  514. vpt 0 360 arc closepath} bind def
  515. /C12 {BL [] 0 setdash 2 copy moveto
  516. 2 copy vpt 180 360 arc closepath fill
  517. vpt 0 360 arc closepath} bind def
  518. /C13 {BL [] 0 setdash 2 copy moveto
  519. 2 copy vpt 0 90 arc closepath fill
  520. 2 copy moveto
  521. 2 copy vpt 180 360 arc closepath fill
  522. vpt 0 360 arc closepath} bind def
  523. /C14 {BL [] 0 setdash 2 copy moveto
  524. 2 copy vpt 90 360 arc closepath fill
  525. vpt 0 360 arc} bind def
  526. /C15 {BL [] 0 setdash 2 copy vpt 0 360 arc closepath fill
  527. vpt 0 360 arc closepath} bind def
  528. /Rec {newpath 4 2 roll moveto 1 index 0 rlineto 0 exch rlineto
  529. neg 0 rlineto closepath} bind def
  530. /Square {dup Rec} bind def
  531. /Bsquare {vpt sub exch vpt sub exch vpt2 Square} bind def
  532. /S0 {BL [] 0 setdash 2 copy moveto 0 vpt rlineto BL Bsquare} bind def
  533. /S1 {BL [] 0 setdash 2 copy vpt Square fill Bsquare} bind def
  534. /S2 {BL [] 0 setdash 2 copy exch vpt sub exch vpt Square fill Bsquare} bind def
  535. /S3 {BL [] 0 setdash 2 copy exch vpt sub exch vpt2 vpt Rec fill Bsquare} bind def
  536. /S4 {BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt Square fill Bsquare} bind def
  537. /S5 {BL [] 0 setdash 2 copy 2 copy vpt Square fill
  538. exch vpt sub exch vpt sub vpt Square fill Bsquare} bind def
  539. /S6 {BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt vpt2 Rec fill Bsquare} bind def
  540. /S7 {BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt vpt2 Rec fill
  541. 2 copy vpt Square fill Bsquare} bind def
  542. /S8 {BL [] 0 setdash 2 copy vpt sub vpt Square fill Bsquare} bind def
  543. /S9 {BL [] 0 setdash 2 copy vpt sub vpt vpt2 Rec fill Bsquare} bind def
  544. /S10 {BL [] 0 setdash 2 copy vpt sub vpt Square fill 2 copy exch vpt sub exch vpt Square fill
  545. Bsquare} bind def
  546. /S11 {BL [] 0 setdash 2 copy vpt sub vpt Square fill 2 copy exch vpt sub exch vpt2 vpt Rec fill
  547. Bsquare} bind def
  548. /S12 {BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt2 vpt Rec fill Bsquare} bind def
  549. /S13 {BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt2 vpt Rec fill
  550. 2 copy vpt Square fill Bsquare} bind def
  551. /S14 {BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt2 vpt Rec fill
  552. 2 copy exch vpt sub exch vpt Square fill Bsquare} bind def
  553. /S15 {BL [] 0 setdash 2 copy Bsquare fill Bsquare} bind def
  554. /D0 {gsave translate 45 rotate 0 0 S0 stroke grestore} bind def
  555. /D1 {gsave translate 45 rotate 0 0 S1 stroke grestore} bind def
  556. /D2 {gsave translate 45 rotate 0 0 S2 stroke grestore} bind def
  557. /D3 {gsave translate 45 rotate 0 0 S3 stroke grestore} bind def
  558. /D4 {gsave translate 45 rotate 0 0 S4 stroke grestore} bind def
  559. /D5 {gsave translate 45 rotate 0 0 S5 stroke grestore} bind def
  560. /D6 {gsave translate 45 rotate 0 0 S6 stroke grestore} bind def
  561. /D7 {gsave translate 45 rotate 0 0 S7 stroke grestore} bind def
  562. /D8 {gsave translate 45 rotate 0 0 S8 stroke grestore} bind def
  563. /D9 {gsave translate 45 rotate 0 0 S9 stroke grestore} bind def
  564. /D10 {gsave translate 45 rotate 0 0 S10 stroke grestore} bind def
  565. /D11 {gsave translate 45 rotate 0 0 S11 stroke grestore} bind def
  566. /D12 {gsave translate 45 rotate 0 0 S12 stroke grestore} bind def
  567. /D13 {gsave translate 45 rotate 0 0 S13 stroke grestore} bind def
  568. /D14 {gsave translate 45 rotate 0 0 S14 stroke grestore} bind def
  569. /D15 {gsave translate 45 rotate 0 0 S15 stroke grestore} bind def
  570. /DiaE {stroke [] 0 setdash vpt add M
  571. hpt neg vpt neg V hpt vpt neg V
  572. hpt vpt V hpt neg vpt V closepath stroke} def
  573. /BoxE {stroke [] 0 setdash exch hpt sub exch vpt add M
  574. 0 vpt2 neg V hpt2 0 V 0 vpt2 V
  575. hpt2 neg 0 V closepath stroke} def
  576. /TriUE {stroke [] 0 setdash vpt 1.12 mul add M
  577. hpt neg vpt -1.62 mul V
  578. hpt 2 mul 0 V
  579. hpt neg vpt 1.62 mul V closepath stroke} def
  580. /TriDE {stroke [] 0 setdash vpt 1.12 mul sub M
  581. hpt neg vpt 1.62 mul V
  582. hpt 2 mul 0 V
  583. hpt neg vpt -1.62 mul V closepath stroke} def
  584. /PentE {stroke [] 0 setdash gsave
  585. translate 0 hpt M 4 {72 rotate 0 hpt L} repeat
  586. closepath stroke grestore} def
  587. /CircE {stroke [] 0 setdash
  588. hpt 0 360 arc stroke} def
  589. /Opaque {gsave closepath 1 setgray fill grestore 0 setgray closepath} def
  590. /DiaW {stroke [] 0 setdash vpt add M
  591. hpt neg vpt neg V hpt vpt neg V
  592. hpt vpt V hpt neg vpt V Opaque stroke} def
  593. /BoxW {stroke [] 0 setdash exch hpt sub exch vpt add M
  594. 0 vpt2 neg V hpt2 0 V 0 vpt2 V
  595. hpt2 neg 0 V Opaque stroke} def
  596. /TriUW {stroke [] 0 setdash vpt 1.12 mul add M
  597. hpt neg vpt -1.62 mul V
  598. hpt 2 mul 0 V
  599. hpt neg vpt 1.62 mul V Opaque stroke} def
  600. /TriDW {stroke [] 0 setdash vpt 1.12 mul sub M
  601. hpt neg vpt 1.62 mul V
  602. hpt 2 mul 0 V
  603. hpt neg vpt -1.62 mul V Opaque stroke} def
  604. /PentW {stroke [] 0 setdash gsave
  605. translate 0 hpt M 4 {72 rotate 0 hpt L} repeat
  606. Opaque stroke grestore} def
  607. /CircW {stroke [] 0 setdash
  608. hpt 0 360 arc Opaque stroke} def
  609. /BoxFill {gsave Rec 1 setgray fill grestore} def
  610. /Density {
  611. /Fillden exch def
  612. currentrgbcolor
  613. /ColB exch def /ColG exch def /ColR exch def
  614. /ColR ColR Fillden mul Fillden sub 1 add def
  615. /ColG ColG Fillden mul Fillden sub 1 add def
  616. /ColB ColB Fillden mul Fillden sub 1 add def
  617. ColR ColG ColB setrgbcolor} def
  618. /BoxColFill {gsave Rec PolyFill} def
  619. /PolyFill {gsave Density fill grestore grestore} def
  620. /h {rlineto rlineto rlineto gsave closepath fill grestore} bind def
  621. %
  622. % PostScript Level 1 Pattern Fill routine for rectangles
  623. % Usage: x y w h s a XX PatternFill
  624. % x,y = lower left corner of box to be filled
  625. % w,h = width and height of box
  626. % a = angle in degrees between lines and x-axis
  627. % XX = 0/1 for no/yes cross-hatch
  628. %
  629. /PatternFill {gsave /PFa [ 9 2 roll ] def
  630. PFa 0 get PFa 2 get 2 div add PFa 1 get PFa 3 get 2 div add translate
  631. PFa 2 get -2 div PFa 3 get -2 div PFa 2 get PFa 3 get Rec
  632. TransparentPatterns {} {gsave 1 setgray fill grestore} ifelse
  633. clip
  634. currentlinewidth 0.5 mul setlinewidth
  635. /PFs PFa 2 get dup mul PFa 3 get dup mul add sqrt def
  636. 0 0 M PFa 5 get rotate PFs -2 div dup translate
  637. 0 1 PFs PFa 4 get div 1 add floor cvi
  638. {PFa 4 get mul 0 M 0 PFs V} for
  639. 0 PFa 6 get ne {
  640. 0 1 PFs PFa 4 get div 1 add floor cvi
  641. {PFa 4 get mul 0 2 1 roll M PFs 0 V} for
  642. } if
  643. stroke grestore} def
  644. %
  645. /languagelevel where
  646. {pop languagelevel} {1} ifelse
  647. dup 2 lt
  648. {/InterpretLevel1 true def
  649. /InterpretLevel3 false def}
  650. {/InterpretLevel1 Level1 def
  651. 2 gt
  652. {/InterpretLevel3 Level3 def}
  653. {/InterpretLevel3 false def}
  654. ifelse }
  655. ifelse
  656. %
  657. % PostScript level 2 pattern fill definitions
  658. %
  659. /Level2PatternFill {
  660. /Tile8x8 {/PaintType 2 /PatternType 1 /TilingType 1 /BBox [0 0 8 8] /XStep 8 /YStep 8}
  661. bind def
  662. /KeepColor {currentrgbcolor [/Pattern /DeviceRGB] setcolorspace} bind def
  663. << Tile8x8
  664. /PaintProc {0.5 setlinewidth pop 0 0 M 8 8 L 0 8 M 8 0 L stroke}
  665. >> matrix makepattern
  666. /Pat1 exch def
  667. << Tile8x8
  668. /PaintProc {0.5 setlinewidth pop 0 0 M 8 8 L 0 8 M 8 0 L stroke
  669. 0 4 M 4 8 L 8 4 L 4 0 L 0 4 L stroke}
  670. >> matrix makepattern
  671. /Pat2 exch def
  672. << Tile8x8
  673. /PaintProc {0.5 setlinewidth pop 0 0 M 0 8 L
  674. 8 8 L 8 0 L 0 0 L fill}
  675. >> matrix makepattern
  676. /Pat3 exch def
  677. << Tile8x8
  678. /PaintProc {0.5 setlinewidth pop -4 8 M 8 -4 L
  679. 0 12 M 12 0 L stroke}
  680. >> matrix makepattern
  681. /Pat4 exch def
  682. << Tile8x8
  683. /PaintProc {0.5 setlinewidth pop -4 0 M 8 12 L
  684. 0 -4 M 12 8 L stroke}
  685. >> matrix makepattern
  686. /Pat5 exch def
  687. << Tile8x8
  688. /PaintProc {0.5 setlinewidth pop -2 8 M 4 -4 L
  689. 0 12 M 8 -4 L 4 12 M 10 0 L stroke}
  690. >> matrix makepattern
  691. /Pat6 exch def
  692. << Tile8x8
  693. /PaintProc {0.5 setlinewidth pop -2 0 M 4 12 L
  694. 0 -4 M 8 12 L 4 -4 M 10 8 L stroke}
  695. >> matrix makepattern
  696. /Pat7 exch def
  697. << Tile8x8
  698. /PaintProc {0.5 setlinewidth pop 8 -2 M -4 4 L
  699. 12 0 M -4 8 L 12 4 M 0 10 L stroke}
  700. >> matrix makepattern
  701. /Pat8 exch def
  702. << Tile8x8
  703. /PaintProc {0.5 setlinewidth pop 0 -2 M 12 4 L
  704. -4 0 M 12 8 L -4 4 M 8 10 L stroke}
  705. >> matrix makepattern
  706. /Pat9 exch def
  707. /Pattern1 {PatternBgnd KeepColor Pat1 setpattern} bind def
  708. /Pattern2 {PatternBgnd KeepColor Pat2 setpattern} bind def
  709. /Pattern3 {PatternBgnd KeepColor Pat3 setpattern} bind def
  710. /Pattern4 {PatternBgnd KeepColor Landscape {Pat5} {Pat4} ifelse setpattern} bind def
  711. /Pattern5 {PatternBgnd KeepColor Landscape {Pat4} {Pat5} ifelse setpattern} bind def
  712. /Pattern6 {PatternBgnd KeepColor Landscape {Pat9} {Pat6} ifelse setpattern} bind def
  713. /Pattern7 {PatternBgnd KeepColor Landscape {Pat8} {Pat7} ifelse setpattern} bind def
  714. } def
  715. %
  716. %
  717. %End of PostScript Level 2 code
  718. %
  719. /PatternBgnd {
  720. TransparentPatterns {} {gsave 1 setgray fill grestore} ifelse
  721. } def
  722. %
  723. % Substitute for Level 2 pattern fill codes with
  724. % grayscale if Level 2 support is not selected.
  725. %
  726. /Level1PatternFill {
  727. /Pattern1 {0.250 Density} bind def
  728. /Pattern2 {0.500 Density} bind def
  729. /Pattern3 {0.750 Density} bind def
  730. /Pattern4 {0.125 Density} bind def
  731. /Pattern5 {0.375 Density} bind def
  732. /Pattern6 {0.625 Density} bind def
  733. /Pattern7 {0.875 Density} bind def
  734. } def
  735. %
  736. % Now test for support of Level 2 code
  737. %
  738. Level1 {Level1PatternFill} {Level2PatternFill} ifelse
  739. %
  740. /Symbol-Oblique /Symbol findfont [1 0 .167 1 0 0] makefont
  741. dup length dict begin {1 index /FID eq {pop pop} {def} ifelse} forall
  742. currentdict end definefont pop
  743. %
  744. /MFshow {
  745. { dup 5 get 3 ge
  746. { 5 get 3 eq {gsave} {grestore} ifelse }
  747. {dup dup 0 get findfont exch 1 get scalefont setfont
  748. [ currentpoint ] exch dup 2 get 0 exch R dup 5 get 2 ne {dup dup 6
  749. get exch 4 get {textshow} {stringwidth pop 0 R} ifelse }if dup 5 get 0 eq
  750. {dup 3 get {2 get neg 0 exch R pop} {pop aload pop M} ifelse} {dup 5
  751. get 1 eq {dup 2 get exch dup 3 get exch 6 get stringwidth pop -2 div
  752. dup 0 R} {dup 6 get stringwidth pop -2 div 0 R 6 get
  753. textshow 2 index {aload pop M neg 3 -1 roll neg R pop pop} {pop pop pop
  754. pop aload pop M} ifelse }ifelse }ifelse }
  755. ifelse }
  756. forall} def
  757. /Gswidth {dup type /stringtype eq {stringwidth} {pop (n) stringwidth} ifelse} def
  758. /MFwidth {0 exch { dup 5 get 3 ge { 5 get 3 eq { 0 } { pop } ifelse }
  759. {dup 3 get{dup dup 0 get findfont exch 1 get scalefont setfont
  760. 6 get Gswidth pop add} {pop} ifelse} ifelse} forall} def
  761. /MLshow { currentpoint stroke M
  762. 0 exch R
  763. Blacktext {gsave 0 setgray MFshow grestore} {MFshow} ifelse } bind def
  764. /MRshow { currentpoint stroke M
  765. exch dup MFwidth neg 3 -1 roll R
  766. Blacktext {gsave 0 setgray MFshow grestore} {MFshow} ifelse } bind def
  767. /MCshow { currentpoint stroke M
  768. exch dup MFwidth -2 div 3 -1 roll R
  769. Blacktext {gsave 0 setgray MFshow grestore} {MFshow} ifelse } bind def
  770. /XYsave { [( ) 1 2 true false 3 ()] } bind def
  771. /XYrestore { [( ) 1 2 true false 4 ()] } bind def
  772. Level1 SuppressPDFMark or
  773. {} {
  774. /SDict 10 dict def
  775. systemdict /pdfmark known not {
  776. userdict /pdfmark systemdict /cleartomark get put
  777. } if
  778. SDict begin [
  779. /Title ()
  780. /Subject (gnuplot plot)
  781. /Creator (gnuplot 5.0 patchlevel 5)
  782. % /Producer (gnuplot)
  783. % /Keywords ()
  784. /CreationDate (Wed Jul 5 16:40:47 2017)
  785. /DOCINFO pdfmark
  786. end
  787. } ifelse
  788. %
  789. % Support for boxed text - Ethan A Merritt May 2005
  790. %
  791. /InitTextBox { userdict /TBy2 3 -1 roll put userdict /TBx2 3 -1 roll put
  792. userdict /TBy1 3 -1 roll put userdict /TBx1 3 -1 roll put
  793. /Boxing true def } def
  794. /ExtendTextBox { Boxing
  795. { gsave dup false charpath pathbbox
  796. dup TBy2 gt {userdict /TBy2 3 -1 roll put} {pop} ifelse
  797. dup TBx2 gt {userdict /TBx2 3 -1 roll put} {pop} ifelse
  798. dup TBy1 lt {userdict /TBy1 3 -1 roll put} {pop} ifelse
  799. dup TBx1 lt {userdict /TBx1 3 -1 roll put} {pop} ifelse
  800. grestore } if } def
  801. /PopTextBox { newpath TBx1 TBxmargin sub TBy1 TBymargin sub M
  802. TBx1 TBxmargin sub TBy2 TBymargin add L
  803. TBx2 TBxmargin add TBy2 TBymargin add L
  804. TBx2 TBxmargin add TBy1 TBymargin sub L closepath } def
  805. /DrawTextBox { PopTextBox stroke /Boxing false def} def
  806. /FillTextBox { gsave PopTextBox 1 1 1 setrgbcolor fill grestore /Boxing false def} def
  807. 0 0 0 0 InitTextBox
  808. /TBxmargin 20 def
  809. /TBymargin 20 def
  810. /Boxing false def
  811. /textshow { ExtendTextBox Gshow } def
  812. %
  813. % redundant definitions for compatibility with prologue.ps older than 5.0.2
  814. /LTB {BL [] LCb DL} def
  815. /LTb {PL [] LCb DL} def
  816. end
  817. %%EndProlog