| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837 |
- #!/usr/bin/env perl
- #
- # Fix line type and color of gnuplot-generated PostScript files.
- # Copyright (c) 2006-2015, Hiroyuki Ohsaki.
- # All rights reserved.
- #
- # $Id: psfix-gnuplot,v 1.15 2023/03/30 08:33:22 ohsaki Exp $
- #
- use File::Basename;
- use Getopt::Std;
- use strict;
- my $COLOR_FACTOR = 1.00;
- my %COLOR_MAP = (
- 0 => [qw(0.9 0 0)], # red
- 1 => [qw(0.2 0.7 0)], # green
- 2 => [qw(0 0.1 0.9)], # blue
- 3 => [qw(0 0.8 0.8)], # cyan
- 4 => [qw(0.6 0 0.9)], # purple
- 5 => [qw(1 0.7 0)], # orange
- 6 => [qw(0.5 0.5 0.5)], # gray
- );
- my %POINT_MAP = (
- 'Pnt' => 'Pnt',
- 'Pls' => 'CircleF',
- 'Crs' => 'BoxF',
- 'Star' => 'DiaF',
- 'Box' => 'TriUF',
- 'BoxF' => 'TriDF',
- 'Circle' => 'Circle',
- 'CircleF' => 'Box',
- 'TriU' => 'Dia',
- 'TriUF' => 'TriU',
- 'TriD' => 'TriD'
- );
- sub usage {
- my $prog = basename($0);
- die <<EOF;
- usage: $prog [-e] [file...]
- -e change line type/color of errorbars
- EOF
- }
- our $opt_e;
- getopts('e') or usage();
- my $force_errorbar = $opt_e;
- my @buf;
- my $with_errorbar = 0;
- while (<>) {
- chomp;
- push @buf, $_;
- # detect if the plot has errorbars; if the second line has a
- # legend, it implies that the plot does not have errorbars
- if ( /^% Begin plot #2/ .. /^% End plot #2/ ) {
- $with_errorbar = 0 if /MRshow/;
- }
- }
- $with_errorbar = 1 if $force_errorbar;
- if ($with_errorbar) {
- # FIXME: with errorbars, only 9 lines are supported
- %POINT_MAP = (
- 'Pnt' => 'Pnt',
- 'Pls' => 'CircleF',
- 'Crs' => 'CircleF',
- 'Star' => 'BoxF',
- 'Box' => 'BoxF',
- 'BoxF' => 'DiaF',
- 'Circle' => 'DiaF',
- 'CircleF' => 'TriUF',
- 'TriU' => 'TriUF',
- 'TriUF' => 'TriDF',
- 'TriD' => 'TriDF',
- 'TriDF' => 'Circle',
- 'Dia' => 'Circle',
- 'DiaF' => 'Box',
- 'Pent' => 'Box',
- 'PentF' => 'Dia',
- 'C0' => 'Dia'
- );
- }
- for (@buf) {
- # line color
- if (m:^/LC(\w+) \{([\d.]+) ([\d.]+) ([\d.]+)\} def$:) {
- my ( $color_number, $r, $g, $b ) = ( $1, $2, $3, $4 );
- my $n = $color_number;
- if ( $with_errorbar and $n > 0 ) {
- $n = int( $color_number / 2 );
- }
- if ( exists $COLOR_MAP{$n} ) {
- ( $r, $g, $b ) = map { $_ * $COLOR_FACTOR } @{ $COLOR_MAP{$n} };
- }
- $_ = "/LC$color_number {$r $g $b} def";
- }
- # point data
- if (/^([\d.]+) ([\d.]+) (\w+)$/) {
- my ( $x, $y, $pnt ) = ( $1, $2, $3 );
- if ( exists $POINT_MAP{$pnt} ) {
- $_ = "$x $y $POINT_MAP{$pnt}";
- }
- }
- print "$_\n";
- }
- __END__
- gnuplot-4.0.0/term/post.trm:
- "/LT0 { PL [] 1 0 0 DL } def\n",
- "/LT1 { PL [4 dl 2 dl] 0 1 0 DL } def\n",
- "/LT2 { PL [2 dl 3 dl] 0 0 1 DL } def\n",
- "/LT3 { PL [1 dl 1.5 dl] 1 0 1 DL } def\n",
- "/LT4 { PL [5 dl 2 dl 1 dl 2 dl] 0 1 1 DL } def\n",
- "/LT5 { PL [4 dl 3 dl 1 dl 3 dl] 1 1 0 DL } def\n",
- "/LT6 { PL [2 dl 2 dl 2 dl 4 dl] 0 0 0 DL } def\n",
- "/LT7 { PL [2 dl 2 dl 2 dl 2 dl 2 dl 4 dl] 1 0.3 0 DL } def\n",
- "/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",
- /* postscript point routines */
- TERM_PUBLIC void
- PS_point(x,y,number)
- unsigned int x,y;
- int number;
- {
- static const char GPFAR * GPFAR pointFNS[] = {
- "Pnt", "Pls", "Crs", "Star",
- "Box", "BoxF", "Circle", "CircleF",
- "TriU", "TriUF", "TriD", "TriDF",
- "Dia", "DiaF", "Pent", "PentF",
- "C0", "C1", "C2", "C3",
- "C4", "C5", "C6", "C7",
- "C8", "C9", "C10", "C11",
- "C12", "C13", "C14", "C15",
- "S0", "S1", "S2", "S3",
- "S4", "S5", "S6", "S7",
- "S8", "S9", "S10", "S11",
- "S12", "S13", "S14", "S15",
- "D0", "D1", "D2", "D3",
- "D4", "D5", "D6", "D7",
- "D8", "D9", "D10", "D11",
- "D12", "D13", "D14", "D15",
- "BoxE", "CircE", "TriUE", "TriDE",
- "DiaE", "PentE", "BoxW", "CircW",
- "TriUW", "TriDW", "DiaW", "PentW"
- };
- gnuplot-4.2.2/term/post.trm:
- % Default Line colors
- /LCw {1 1 1} def
- /LCb {0 0 0} def
- /LCa {0 0 0} def
- /LC0 {1 0 0} def
- /LC1 {0 1 0} def
- /LC2 {0 0 1} def
- /LC3 {1 0 1} def
- /LC4 {0 1 1} def
- /LC5 {1 1 0} def
- /LC6 {0 0 0} def
- /LC7 {1 0.3 0} def
- /LC8 {0.5 0.5 0.5} def
- % Default Line Types
- /LTw {PL [] 1 setgray} def
- /LTb {BL [] LCb DL} def
- /LTa {AL [1 udl mul 2 udl mul] 0 setdash LCa setrgbcolor} def
- /LT0 {PL [] LC0 DL} def
- /LT1 {PL [4 dl1 2 dl2] LC1 DL} def
- /LT2 {PL [2 dl1 3 dl2] LC2 DL} def
- /LT3 {PL [1 dl1 1.5 dl2] LC3 DL} def
- /LT4 {PL [6 dl1 2 dl2 1 dl1 2 dl2] LC4 DL} def
- /LT5 {PL [3 dl1 3 dl2 1 dl1 3 dl2] LC5 DL} def
- /LT6 {PL [2 dl1 2 dl2 2 dl1 6 dl2] LC6 DL} def
- /LT7 {PL [1 dl1 2 dl2 6 dl1 2 dl2 1 dl1 2 dl2] LC7 DL} def
- /LT8 {PL [2 dl1 2 dl2 2 dl1 2 dl2 2 dl1 2 dl2 2 dl1 4 dl2] LC8 DL} def
- /Pnt {stroke [] 0 setdash gsave 1 setlinecap M 0 0 V stroke grestore} def
- /Dia {stroke [] 0 setdash 2 copy vpt add M
- hpt neg vpt neg V hpt vpt neg V
- hpt vpt V hpt neg vpt V closepath stroke
- Pnt} def
- /Pls {stroke [] 0 setdash vpt sub M 0 vpt2 V
- currentpoint stroke M
- hpt neg vpt neg R hpt2 0 V stroke
- } def
- /Box {stroke [] 0 setdash 2 copy exch hpt sub exch vpt add M
- 0 vpt2 neg V hpt2 0 V 0 vpt2 V
- hpt2 neg 0 V closepath stroke
- Pnt} def
- /Crs {stroke [] 0 setdash exch hpt sub exch vpt add M
- hpt2 vpt2 neg V currentpoint stroke M
- hpt2 neg 0 R hpt2 vpt2 V stroke} def
- /TriU {stroke [] 0 setdash 2 copy vpt 1.12 mul add M
- hpt neg vpt -1.62 mul V
- hpt 2 mul 0 V
- hpt neg vpt 1.62 mul V closepath stroke
- Pnt} def
- /Star {2 copy Pls Crs} def
- /BoxF {stroke [] 0 setdash exch hpt sub exch vpt add M
- 0 vpt2 neg V hpt2 0 V 0 vpt2 V
- hpt2 neg 0 V closepath fill} def
- /TriUF {stroke [] 0 setdash vpt 1.12 mul add M
- hpt neg vpt -1.62 mul V
- hpt 2 mul 0 V
- hpt neg vpt 1.62 mul V closepath fill} def
- /TriD {stroke [] 0 setdash 2 copy vpt 1.12 mul sub M
- hpt neg vpt 1.62 mul V
- hpt 2 mul 0 V
- hpt neg vpt -1.62 mul V closepath stroke
- Pnt} def
- /TriDF {stroke [] 0 setdash vpt 1.12 mul sub M
- hpt neg vpt 1.62 mul V
- hpt 2 mul 0 V
- hpt neg vpt -1.62 mul V closepath fill} def
- /DiaF {stroke [] 0 setdash vpt add M
- hpt neg vpt neg V hpt vpt neg V
- hpt vpt V hpt neg vpt V closepath fill} def
- /Pent {stroke [] 0 setdash 2 copy gsave
- translate 0 hpt M 4 {72 rotate 0 hpt L} repeat
- closepath stroke grestore Pnt} def
- /PentF {stroke [] 0 setdash gsave
- translate 0 hpt M 4 {72 rotate 0 hpt L} repeat
- closepath fill grestore} def
- /Circle {stroke [] 0 setdash 2 copy
- hpt 0 360 arc stroke Pnt} def
- /CircleF {stroke [] 0 setdash hpt 0 360 arc fill} def
- /C0 {BL [] 0 setdash 2 copy moveto vpt 90 450 arc} bind def
- /C1 {BL [] 0 setdash 2 copy moveto
- 2 copy vpt 0 90 arc closepath fill
- vpt 0 360 arc closepath} bind def
- /C2 {BL [] 0 setdash 2 copy moveto
- 2 copy vpt 90 180 arc closepath fill
- vpt 0 360 arc closepath} bind def
- /C3 {BL [] 0 setdash 2 copy moveto
- 2 copy vpt 0 180 arc closepath fill
- vpt 0 360 arc closepath} bind def
- /C4 {BL [] 0 setdash 2 copy moveto
- 2 copy vpt 180 270 arc closepath fill
- vpt 0 360 arc closepath} bind def
- /C5 {BL [] 0 setdash 2 copy moveto
- 2 copy vpt 0 90 arc
- 2 copy moveto
- 2 copy vpt 180 270 arc closepath fill
- vpt 0 360 arc} bind def
- /C6 {BL [] 0 setdash 2 copy moveto
- 2 copy vpt 90 270 arc closepath fill
- vpt 0 360 arc closepath} bind def
- /C7 {BL [] 0 setdash 2 copy moveto
- 2 copy vpt 0 270 arc closepath fill
- vpt 0 360 arc closepath} bind def
- /C8 {BL [] 0 setdash 2 copy moveto
- 2 copy vpt 270 360 arc closepath fill
- vpt 0 360 arc closepath} bind def
- /C9 {BL [] 0 setdash 2 copy moveto
- 2 copy vpt 270 450 arc closepath fill
- vpt 0 360 arc closepath} bind def
- /C10 {BL [] 0 setdash 2 copy 2 copy moveto vpt 270 360 arc closepath fill
- 2 copy moveto
- 2 copy vpt 90 180 arc closepath fill
- vpt 0 360 arc closepath} bind def
- /C11 {BL [] 0 setdash 2 copy moveto
- 2 copy vpt 0 180 arc closepath fill
- 2 copy moveto
- 2 copy vpt 270 360 arc closepath fill
- vpt 0 360 arc closepath} bind def
- /C12 {BL [] 0 setdash 2 copy moveto
- 2 copy vpt 180 360 arc closepath fill
- vpt 0 360 arc closepath} bind def
- /C13 {BL [] 0 setdash 2 copy moveto
- 2 copy vpt 0 90 arc closepath fill
- 2 copy moveto
- 2 copy vpt 180 360 arc closepath fill
- vpt 0 360 arc closepath} bind def
- /C14 {BL [] 0 setdash 2 copy moveto
- 2 copy vpt 90 360 arc closepath fill
- vpt 0 360 arc} bind def
- /C15 {BL [] 0 setdash 2 copy vpt 0 360 arc closepath fill
- vpt 0 360 arc closepath} bind def
- /Rec {newpath 4 2 roll moveto 1 index 0 rlineto 0 exch rlineto
- neg 0 rlineto closepath} bind def
- /Square {dup Rec} bind def
- /Bsquare {vpt sub exch vpt sub exch vpt2 Square} bind def
- /S0 {BL [] 0 setdash 2 copy moveto 0 vpt rlineto BL Bsquare} bind def
- /S1 {BL [] 0 setdash 2 copy vpt Square fill Bsquare} bind def
- /S2 {BL [] 0 setdash 2 copy exch vpt sub exch vpt Square fill Bsquare} bind def
- /S3 {BL [] 0 setdash 2 copy exch vpt sub exch vpt2 vpt Rec fill Bsquare} bind def
- /S4 {BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt Square fill Bsquare} bind def
- /S5 {BL [] 0 setdash 2 copy 2 copy vpt Square fill
- exch vpt sub exch vpt sub vpt Square fill Bsquare} bind def
- /S6 {BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt vpt2 Rec fill Bsquare} bind def
- /S7 {BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt vpt2 Rec fill
- 2 copy vpt Square fill Bsquare} bind def
- /S8 {BL [] 0 setdash 2 copy vpt sub vpt Square fill Bsquare} bind def
- /S9 {BL [] 0 setdash 2 copy vpt sub vpt vpt2 Rec fill Bsquare} bind def
- /S10 {BL [] 0 setdash 2 copy vpt sub vpt Square fill 2 copy exch vpt sub exch vpt Square fill
- Bsquare} bind def
- /S11 {BL [] 0 setdash 2 copy vpt sub vpt Square fill 2 copy exch vpt sub exch vpt2 vpt Rec fill
- Bsquare} bind def
- /S12 {BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt2 vpt Rec fill Bsquare} bind def
- /S13 {BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt2 vpt Rec fill
- 2 copy vpt Square fill Bsquare} bind def
- /S14 {BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt2 vpt Rec fill
- 2 copy exch vpt sub exch vpt Square fill Bsquare} bind def
- /S15 {BL [] 0 setdash 2 copy Bsquare fill Bsquare} bind def
- /D0 {gsave translate 45 rotate 0 0 S0 stroke grestore} bind def
- /D1 {gsave translate 45 rotate 0 0 S1 stroke grestore} bind def
- /D2 {gsave translate 45 rotate 0 0 S2 stroke grestore} bind def
- /D3 {gsave translate 45 rotate 0 0 S3 stroke grestore} bind def
- /D4 {gsave translate 45 rotate 0 0 S4 stroke grestore} bind def
- /D5 {gsave translate 45 rotate 0 0 S5 stroke grestore} bind def
- /D6 {gsave translate 45 rotate 0 0 S6 stroke grestore} bind def
- /D7 {gsave translate 45 rotate 0 0 S7 stroke grestore} bind def
- /D8 {gsave translate 45 rotate 0 0 S8 stroke grestore} bind def
- /D9 {gsave translate 45 rotate 0 0 S9 stroke grestore} bind def
- /D10 {gsave translate 45 rotate 0 0 S10 stroke grestore} bind def
- /D11 {gsave translate 45 rotate 0 0 S11 stroke grestore} bind def
- /D12 {gsave translate 45 rotate 0 0 S12 stroke grestore} bind def
- /D13 {gsave translate 45 rotate 0 0 S13 stroke grestore} bind def
- /D14 {gsave translate 45 rotate 0 0 S14 stroke grestore} bind def
- /D15 {gsave translate 45 rotate 0 0 S15 stroke grestore} bind def
- /DiaE {stroke [] 0 setdash vpt add M
- hpt neg vpt neg V hpt vpt neg V
- hpt vpt V hpt neg vpt V closepath stroke} def
- /BoxE {stroke [] 0 setdash exch hpt sub exch vpt add M
- 0 vpt2 neg V hpt2 0 V 0 vpt2 V
- hpt2 neg 0 V closepath stroke} def
- /TriUE {stroke [] 0 setdash vpt 1.12 mul add M
- hpt neg vpt -1.62 mul V
- hpt 2 mul 0 V
- hpt neg vpt 1.62 mul V closepath stroke} def
- /TriDE {stroke [] 0 setdash vpt 1.12 mul sub M
- hpt neg vpt 1.62 mul V
- hpt 2 mul 0 V
- hpt neg vpt -1.62 mul V closepath stroke} def
- /PentE {stroke [] 0 setdash gsave
- translate 0 hpt M 4 {72 rotate 0 hpt L} repeat
- closepath stroke grestore} def
- /CircE {stroke [] 0 setdash
- hpt 0 360 arc stroke} def
- /Opaque {gsave closepath 1 setgray fill grestore 0 setgray closepath} def
- /DiaW {stroke [] 0 setdash vpt add M
- hpt neg vpt neg V hpt vpt neg V
- hpt vpt V hpt neg vpt V Opaque stroke} def
- /BoxW {stroke [] 0 setdash exch hpt sub exch vpt add M
- 0 vpt2 neg V hpt2 0 V 0 vpt2 V
- hpt2 neg 0 V Opaque stroke} def
- /TriUW {stroke [] 0 setdash vpt 1.12 mul add M
- hpt neg vpt -1.62 mul V
- hpt 2 mul 0 V
- hpt neg vpt 1.62 mul V Opaque stroke} def
- /TriDW {stroke [] 0 setdash vpt 1.12 mul sub M
- hpt neg vpt 1.62 mul V
- hpt 2 mul 0 V
- hpt neg vpt -1.62 mul V Opaque stroke} def
- /PentW {stroke [] 0 setdash gsave
- translate 0 hpt M 4 {72 rotate 0 hpt L} repeat
- Opaque stroke grestore} def
- /CircW {stroke [] 0 setdash
- hpt 0 360 arc Opaque stroke} def
- /BoxFill {gsave Rec 1 setgray fill grestore} def
- /Density {
- /Fillden exch def
- currentrgbcolor
- /ColB exch def /ColG exch def /ColR exch def
- /ColR ColR Fillden mul Fillden sub 1 add def
- /ColG ColG Fillden mul Fillden sub 1 add def
- /ColB ColB Fillden mul Fillden sub 1 add def
- ColR ColG ColB setrgbcolor} def
- /BoxColFill {gsave Rec PolyFill} def
- /PolyFill {gsave Density fill grestore grestore} def
- /h {rlineto rlineto rlineto gsave fill grestore} bind def
- gnuplot-5.0.5+dfsg1/term/post.trm:
- %
- % Gnuplot Prolog Version 5.1 (Oct 2015)
- %
- %/SuppressPDFMark true def
- %
- /M {moveto} bind def
- /L {lineto} bind def
- /R {rmoveto} bind def
- /V {rlineto} bind def
- /N {newpath moveto} bind def
- /Z {closepath} bind def
- /C {setrgbcolor} bind def
- /f {rlineto fill} bind def
- /g {setgray} bind def
- /Gshow {show} def % May be redefined later in the file to support UTF-8
- /vpt2 vpt 2 mul def
- /hpt2 hpt 2 mul def
- /Lshow {currentpoint stroke M 0 vshift R
- Blacktext {gsave 0 setgray textshow grestore} {textshow} ifelse} def
- /Rshow {currentpoint stroke M dup stringwidth pop neg vshift R
- Blacktext {gsave 0 setgray textshow grestore} {textshow} ifelse} def
- /Cshow {currentpoint stroke M dup stringwidth pop -2 div vshift R
- Blacktext {gsave 0 setgray textshow grestore} {textshow} ifelse} def
- /UP {dup vpt_ mul /vpt exch def hpt_ mul /hpt exch def
- /hpt2 hpt 2 mul def /vpt2 vpt 2 mul def} def
- /DL {Color {setrgbcolor Solid {pop []} if 0 setdash}
- {pop pop pop 0 setgray Solid {pop []} if 0 setdash} ifelse} def
- /BL {stroke userlinewidth 2 mul setlinewidth
- Rounded {1 setlinejoin 1 setlinecap} if} def
- /AL {stroke userlinewidth 2 div setlinewidth
- Rounded {1 setlinejoin 1 setlinecap} if} def
- /UL {dup gnulinewidth mul /userlinewidth exch def
- dup 1 lt {pop 1} if 10 mul /udl exch def} def
- /PL {stroke userlinewidth setlinewidth
- Rounded {1 setlinejoin 1 setlinecap} if} def
- 3.8 setmiterlimit
- % Classic Line colors (version 5.0)
- /LCw {1 1 1} def
- /LCb {0 0 0} def
- /LCa {0 0 0} def
- /LC0 {0.9 0 0} def
- /LC1 {0.2 0.7 0} def
- /LC2 {0 0.1 0.9} def
- /LC3 {0 0.8 0.8} def
- /LC4 {0.6 0 0.9} def
- /LC5 {1 0.7 0} def
- /LC6 {0.5 0.5 0.5} def
- /LC7 {1 0.3 0} def
- /LC8 {0.5 0.5 0.5} def
- % Default dash patterns (version 5.0)
- /LTB {BL [] LCb DL} def
- /LTw {PL [] 1 setgray} def
- /LTb {PL [] LCb DL} def
- /LTa {AL [1 udl mul 2 udl mul] 0 setdash LCa setrgbcolor} def
- /LT0 {PL [] LC0 DL} def
- /LT1 {PL [2 dl1 3 dl2] LC1 DL} def
- /LT2 {PL [1 dl1 1.5 dl2] LC2 DL} def
- /LT3 {PL [6 dl1 2 dl2 1 dl1 2 dl2] LC3 DL} def
- /LT4 {PL [1 dl1 2 dl2 6 dl1 2 dl2 1 dl1 2 dl2] LC4 DL} def
- /LT5 {PL [4 dl1 2 dl2] LC5 DL} def
- /LT6 {PL [1.5 dl1 1.5 dl2 1.5 dl1 1.5 dl2 1.5 dl1 6 dl2] LC6 DL} def
- /LT7 {PL [3 dl1 3 dl2 1 dl1 3 dl2] LC7 DL} def
- /LT8 {PL [2 dl1 2 dl2 2 dl1 6 dl2] LC8 DL} def
- /SL {[] 0 setdash} def
- /Pnt {stroke [] 0 setdash gsave 1 setlinecap M 0 0 V stroke grestore} def
- /Dia {stroke [] 0 setdash 2 copy vpt add M
- hpt neg vpt neg V hpt vpt neg V
- hpt vpt V hpt neg vpt V closepath stroke
- Pnt} def
- /Pls {stroke [] 0 setdash vpt sub M 0 vpt2 V
- currentpoint stroke M
- hpt neg vpt neg R hpt2 0 V stroke
- } def
- /Box {stroke [] 0 setdash 2 copy exch hpt sub exch vpt add M
- 0 vpt2 neg V hpt2 0 V 0 vpt2 V
- hpt2 neg 0 V closepath stroke
- Pnt} def
- /Crs {stroke [] 0 setdash exch hpt sub exch vpt add M
- hpt2 vpt2 neg V currentpoint stroke M
- hpt2 neg 0 R hpt2 vpt2 V stroke} def
- /TriU {stroke [] 0 setdash 2 copy vpt 1.12 mul add M
- hpt neg vpt -1.62 mul V
- hpt 2 mul 0 V
- hpt neg vpt 1.62 mul V closepath stroke
- Pnt} def
- /Star {2 copy Pls Crs} def
- /BoxF {stroke [] 0 setdash exch hpt sub exch vpt add M
- 0 vpt2 neg V hpt2 0 V 0 vpt2 V
- hpt2 neg 0 V closepath fill} def
- /TriUF {stroke [] 0 setdash vpt 1.12 mul add M
- hpt neg vpt -1.62 mul V
- hpt 2 mul 0 V
- hpt neg vpt 1.62 mul V closepath fill} def
- /TriD {stroke [] 0 setdash 2 copy vpt 1.12 mul sub M
- hpt neg vpt 1.62 mul V
- hpt 2 mul 0 V
- hpt neg vpt -1.62 mul V closepath stroke
- Pnt} def
- /TriDF {stroke [] 0 setdash vpt 1.12 mul sub M
- hpt neg vpt 1.62 mul V
- hpt 2 mul 0 V
- hpt neg vpt -1.62 mul V closepath fill} def
- /DiaF {stroke [] 0 setdash vpt add M
- hpt neg vpt neg V hpt vpt neg V
- hpt vpt V hpt neg vpt V closepath fill} def
- /Pent {stroke [] 0 setdash 2 copy gsave
- translate 0 hpt M 4 {72 rotate 0 hpt L} repeat
- closepath stroke grestore Pnt} def
- /PentF {stroke [] 0 setdash gsave
- translate 0 hpt M 4 {72 rotate 0 hpt L} repeat
- closepath fill grestore} def
- /Circle {stroke [] 0 setdash 2 copy
- hpt 0 360 arc stroke Pnt} def
- /CircleF {stroke [] 0 setdash hpt 0 360 arc fill} def
- /C0 {BL [] 0 setdash 2 copy moveto vpt 90 450 arc} bind def
- /C1 {BL [] 0 setdash 2 copy moveto
- 2 copy vpt 0 90 arc closepath fill
- vpt 0 360 arc closepath} bind def
- /C2 {BL [] 0 setdash 2 copy moveto
- 2 copy vpt 90 180 arc closepath fill
- vpt 0 360 arc closepath} bind def
- /C3 {BL [] 0 setdash 2 copy moveto
- 2 copy vpt 0 180 arc closepath fill
- vpt 0 360 arc closepath} bind def
- /C4 {BL [] 0 setdash 2 copy moveto
- 2 copy vpt 180 270 arc closepath fill
- vpt 0 360 arc closepath} bind def
- /C5 {BL [] 0 setdash 2 copy moveto
- 2 copy vpt 0 90 arc
- 2 copy moveto
- 2 copy vpt 180 270 arc closepath fill
- vpt 0 360 arc} bind def
- /C6 {BL [] 0 setdash 2 copy moveto
- 2 copy vpt 90 270 arc closepath fill
- vpt 0 360 arc closepath} bind def
- /C7 {BL [] 0 setdash 2 copy moveto
- 2 copy vpt 0 270 arc closepath fill
- vpt 0 360 arc closepath} bind def
- /C8 {BL [] 0 setdash 2 copy moveto
- 2 copy vpt 270 360 arc closepath fill
- vpt 0 360 arc closepath} bind def
- /C9 {BL [] 0 setdash 2 copy moveto
- 2 copy vpt 270 450 arc closepath fill
- vpt 0 360 arc closepath} bind def
- /C10 {BL [] 0 setdash 2 copy 2 copy moveto vpt 270 360 arc closepath fill
- 2 copy moveto
- 2 copy vpt 90 180 arc closepath fill
- vpt 0 360 arc closepath} bind def
- /C11 {BL [] 0 setdash 2 copy moveto
- 2 copy vpt 0 180 arc closepath fill
- 2 copy moveto
- 2 copy vpt 270 360 arc closepath fill
- vpt 0 360 arc closepath} bind def
- /C12 {BL [] 0 setdash 2 copy moveto
- 2 copy vpt 180 360 arc closepath fill
- vpt 0 360 arc closepath} bind def
- /C13 {BL [] 0 setdash 2 copy moveto
- 2 copy vpt 0 90 arc closepath fill
- 2 copy moveto
- 2 copy vpt 180 360 arc closepath fill
- vpt 0 360 arc closepath} bind def
- /C14 {BL [] 0 setdash 2 copy moveto
- 2 copy vpt 90 360 arc closepath fill
- vpt 0 360 arc} bind def
- /C15 {BL [] 0 setdash 2 copy vpt 0 360 arc closepath fill
- vpt 0 360 arc closepath} bind def
- /Rec {newpath 4 2 roll moveto 1 index 0 rlineto 0 exch rlineto
- neg 0 rlineto closepath} bind def
- /Square {dup Rec} bind def
- /Bsquare {vpt sub exch vpt sub exch vpt2 Square} bind def
- /S0 {BL [] 0 setdash 2 copy moveto 0 vpt rlineto BL Bsquare} bind def
- /S1 {BL [] 0 setdash 2 copy vpt Square fill Bsquare} bind def
- /S2 {BL [] 0 setdash 2 copy exch vpt sub exch vpt Square fill Bsquare} bind def
- /S3 {BL [] 0 setdash 2 copy exch vpt sub exch vpt2 vpt Rec fill Bsquare} bind def
- /S4 {BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt Square fill Bsquare} bind def
- /S5 {BL [] 0 setdash 2 copy 2 copy vpt Square fill
- exch vpt sub exch vpt sub vpt Square fill Bsquare} bind def
- /S6 {BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt vpt2 Rec fill Bsquare} bind def
- /S7 {BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt vpt2 Rec fill
- 2 copy vpt Square fill Bsquare} bind def
- /S8 {BL [] 0 setdash 2 copy vpt sub vpt Square fill Bsquare} bind def
- /S9 {BL [] 0 setdash 2 copy vpt sub vpt vpt2 Rec fill Bsquare} bind def
- /S10 {BL [] 0 setdash 2 copy vpt sub vpt Square fill 2 copy exch vpt sub exch vpt Square fill
- Bsquare} bind def
- /S11 {BL [] 0 setdash 2 copy vpt sub vpt Square fill 2 copy exch vpt sub exch vpt2 vpt Rec fill
- Bsquare} bind def
- /S12 {BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt2 vpt Rec fill Bsquare} bind def
- /S13 {BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt2 vpt Rec fill
- 2 copy vpt Square fill Bsquare} bind def
- /S14 {BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt2 vpt Rec fill
- 2 copy exch vpt sub exch vpt Square fill Bsquare} bind def
- /S15 {BL [] 0 setdash 2 copy Bsquare fill Bsquare} bind def
- /D0 {gsave translate 45 rotate 0 0 S0 stroke grestore} bind def
- /D1 {gsave translate 45 rotate 0 0 S1 stroke grestore} bind def
- /D2 {gsave translate 45 rotate 0 0 S2 stroke grestore} bind def
- /D3 {gsave translate 45 rotate 0 0 S3 stroke grestore} bind def
- /D4 {gsave translate 45 rotate 0 0 S4 stroke grestore} bind def
- /D5 {gsave translate 45 rotate 0 0 S5 stroke grestore} bind def
- /D6 {gsave translate 45 rotate 0 0 S6 stroke grestore} bind def
- /D7 {gsave translate 45 rotate 0 0 S7 stroke grestore} bind def
- /D8 {gsave translate 45 rotate 0 0 S8 stroke grestore} bind def
- /D9 {gsave translate 45 rotate 0 0 S9 stroke grestore} bind def
- /D10 {gsave translate 45 rotate 0 0 S10 stroke grestore} bind def
- /D11 {gsave translate 45 rotate 0 0 S11 stroke grestore} bind def
- /D12 {gsave translate 45 rotate 0 0 S12 stroke grestore} bind def
- /D13 {gsave translate 45 rotate 0 0 S13 stroke grestore} bind def
- /D14 {gsave translate 45 rotate 0 0 S14 stroke grestore} bind def
- /D15 {gsave translate 45 rotate 0 0 S15 stroke grestore} bind def
- /DiaE {stroke [] 0 setdash vpt add M
- hpt neg vpt neg V hpt vpt neg V
- hpt vpt V hpt neg vpt V closepath stroke} def
- /BoxE {stroke [] 0 setdash exch hpt sub exch vpt add M
- 0 vpt2 neg V hpt2 0 V 0 vpt2 V
- hpt2 neg 0 V closepath stroke} def
- /TriUE {stroke [] 0 setdash vpt 1.12 mul add M
- hpt neg vpt -1.62 mul V
- hpt 2 mul 0 V
- hpt neg vpt 1.62 mul V closepath stroke} def
- /TriDE {stroke [] 0 setdash vpt 1.12 mul sub M
- hpt neg vpt 1.62 mul V
- hpt 2 mul 0 V
- hpt neg vpt -1.62 mul V closepath stroke} def
- /PentE {stroke [] 0 setdash gsave
- translate 0 hpt M 4 {72 rotate 0 hpt L} repeat
- closepath stroke grestore} def
- /CircE {stroke [] 0 setdash
- hpt 0 360 arc stroke} def
- /Opaque {gsave closepath 1 setgray fill grestore 0 setgray closepath} def
- /DiaW {stroke [] 0 setdash vpt add M
- hpt neg vpt neg V hpt vpt neg V
- hpt vpt V hpt neg vpt V Opaque stroke} def
- /BoxW {stroke [] 0 setdash exch hpt sub exch vpt add M
- 0 vpt2 neg V hpt2 0 V 0 vpt2 V
- hpt2 neg 0 V Opaque stroke} def
- /TriUW {stroke [] 0 setdash vpt 1.12 mul add M
- hpt neg vpt -1.62 mul V
- hpt 2 mul 0 V
- hpt neg vpt 1.62 mul V Opaque stroke} def
- /TriDW {stroke [] 0 setdash vpt 1.12 mul sub M
- hpt neg vpt 1.62 mul V
- hpt 2 mul 0 V
- hpt neg vpt -1.62 mul V Opaque stroke} def
- /PentW {stroke [] 0 setdash gsave
- translate 0 hpt M 4 {72 rotate 0 hpt L} repeat
- Opaque stroke grestore} def
- /CircW {stroke [] 0 setdash
- hpt 0 360 arc Opaque stroke} def
- /BoxFill {gsave Rec 1 setgray fill grestore} def
- /Density {
- /Fillden exch def
- currentrgbcolor
- /ColB exch def /ColG exch def /ColR exch def
- /ColR ColR Fillden mul Fillden sub 1 add def
- /ColG ColG Fillden mul Fillden sub 1 add def
- /ColB ColB Fillden mul Fillden sub 1 add def
- ColR ColG ColB setrgbcolor} def
- /BoxColFill {gsave Rec PolyFill} def
- /PolyFill {gsave Density fill grestore grestore} def
- /h {rlineto rlineto rlineto gsave closepath fill grestore} bind def
- %
- % PostScript Level 1 Pattern Fill routine for rectangles
- % Usage: x y w h s a XX PatternFill
- % x,y = lower left corner of box to be filled
- % w,h = width and height of box
- % a = angle in degrees between lines and x-axis
- % XX = 0/1 for no/yes cross-hatch
- %
- /PatternFill {gsave /PFa [ 9 2 roll ] def
- PFa 0 get PFa 2 get 2 div add PFa 1 get PFa 3 get 2 div add translate
- PFa 2 get -2 div PFa 3 get -2 div PFa 2 get PFa 3 get Rec
- TransparentPatterns {} {gsave 1 setgray fill grestore} ifelse
- clip
- currentlinewidth 0.5 mul setlinewidth
- /PFs PFa 2 get dup mul PFa 3 get dup mul add sqrt def
- 0 0 M PFa 5 get rotate PFs -2 div dup translate
- 0 1 PFs PFa 4 get div 1 add floor cvi
- {PFa 4 get mul 0 M 0 PFs V} for
- 0 PFa 6 get ne {
- 0 1 PFs PFa 4 get div 1 add floor cvi
- {PFa 4 get mul 0 2 1 roll M PFs 0 V} for
- } if
- stroke grestore} def
- %
- /languagelevel where
- {pop languagelevel} {1} ifelse
- dup 2 lt
- {/InterpretLevel1 true def
- /InterpretLevel3 false def}
- {/InterpretLevel1 Level1 def
- 2 gt
- {/InterpretLevel3 Level3 def}
- {/InterpretLevel3 false def}
- ifelse }
- ifelse
- %
- % PostScript level 2 pattern fill definitions
- %
- /Level2PatternFill {
- /Tile8x8 {/PaintType 2 /PatternType 1 /TilingType 1 /BBox [0 0 8 8] /XStep 8 /YStep 8}
- bind def
- /KeepColor {currentrgbcolor [/Pattern /DeviceRGB] setcolorspace} bind def
- << Tile8x8
- /PaintProc {0.5 setlinewidth pop 0 0 M 8 8 L 0 8 M 8 0 L stroke}
- >> matrix makepattern
- /Pat1 exch def
- << Tile8x8
- /PaintProc {0.5 setlinewidth pop 0 0 M 8 8 L 0 8 M 8 0 L stroke
- 0 4 M 4 8 L 8 4 L 4 0 L 0 4 L stroke}
- >> matrix makepattern
- /Pat2 exch def
- << Tile8x8
- /PaintProc {0.5 setlinewidth pop 0 0 M 0 8 L
- 8 8 L 8 0 L 0 0 L fill}
- >> matrix makepattern
- /Pat3 exch def
- << Tile8x8
- /PaintProc {0.5 setlinewidth pop -4 8 M 8 -4 L
- 0 12 M 12 0 L stroke}
- >> matrix makepattern
- /Pat4 exch def
- << Tile8x8
- /PaintProc {0.5 setlinewidth pop -4 0 M 8 12 L
- 0 -4 M 12 8 L stroke}
- >> matrix makepattern
- /Pat5 exch def
- << Tile8x8
- /PaintProc {0.5 setlinewidth pop -2 8 M 4 -4 L
- 0 12 M 8 -4 L 4 12 M 10 0 L stroke}
- >> matrix makepattern
- /Pat6 exch def
- << Tile8x8
- /PaintProc {0.5 setlinewidth pop -2 0 M 4 12 L
- 0 -4 M 8 12 L 4 -4 M 10 8 L stroke}
- >> matrix makepattern
- /Pat7 exch def
- << Tile8x8
- /PaintProc {0.5 setlinewidth pop 8 -2 M -4 4 L
- 12 0 M -4 8 L 12 4 M 0 10 L stroke}
- >> matrix makepattern
- /Pat8 exch def
- << Tile8x8
- /PaintProc {0.5 setlinewidth pop 0 -2 M 12 4 L
- -4 0 M 12 8 L -4 4 M 8 10 L stroke}
- >> matrix makepattern
- /Pat9 exch def
- /Pattern1 {PatternBgnd KeepColor Pat1 setpattern} bind def
- /Pattern2 {PatternBgnd KeepColor Pat2 setpattern} bind def
- /Pattern3 {PatternBgnd KeepColor Pat3 setpattern} bind def
- /Pattern4 {PatternBgnd KeepColor Landscape {Pat5} {Pat4} ifelse setpattern} bind def
- /Pattern5 {PatternBgnd KeepColor Landscape {Pat4} {Pat5} ifelse setpattern} bind def
- /Pattern6 {PatternBgnd KeepColor Landscape {Pat9} {Pat6} ifelse setpattern} bind def
- /Pattern7 {PatternBgnd KeepColor Landscape {Pat8} {Pat7} ifelse setpattern} bind def
- } def
- %
- %
- %End of PostScript Level 2 code
- %
- /PatternBgnd {
- TransparentPatterns {} {gsave 1 setgray fill grestore} ifelse
- } def
- %
- % Substitute for Level 2 pattern fill codes with
- % grayscale if Level 2 support is not selected.
- %
- /Level1PatternFill {
- /Pattern1 {0.250 Density} bind def
- /Pattern2 {0.500 Density} bind def
- /Pattern3 {0.750 Density} bind def
- /Pattern4 {0.125 Density} bind def
- /Pattern5 {0.375 Density} bind def
- /Pattern6 {0.625 Density} bind def
- /Pattern7 {0.875 Density} bind def
- } def
- %
- % Now test for support of Level 2 code
- %
- Level1 {Level1PatternFill} {Level2PatternFill} ifelse
- %
- /Symbol-Oblique /Symbol findfont [1 0 .167 1 0 0] makefont
- dup length dict begin {1 index /FID eq {pop pop} {def} ifelse} forall
- currentdict end definefont pop
- %
- /MFshow {
- { dup 5 get 3 ge
- { 5 get 3 eq {gsave} {grestore} ifelse }
- {dup dup 0 get findfont exch 1 get scalefont setfont
- [ currentpoint ] exch dup 2 get 0 exch R dup 5 get 2 ne {dup dup 6
- get exch 4 get {textshow} {stringwidth pop 0 R} ifelse }if dup 5 get 0 eq
- {dup 3 get {2 get neg 0 exch R pop} {pop aload pop M} ifelse} {dup 5
- get 1 eq {dup 2 get exch dup 3 get exch 6 get stringwidth pop -2 div
- dup 0 R} {dup 6 get stringwidth pop -2 div 0 R 6 get
- textshow 2 index {aload pop M neg 3 -1 roll neg R pop pop} {pop pop pop
- pop aload pop M} ifelse }ifelse }ifelse }
- ifelse }
- forall} def
- /Gswidth {dup type /stringtype eq {stringwidth} {pop (n) stringwidth} ifelse} def
- /MFwidth {0 exch { dup 5 get 3 ge { 5 get 3 eq { 0 } { pop } ifelse }
- {dup 3 get{dup dup 0 get findfont exch 1 get scalefont setfont
- 6 get Gswidth pop add} {pop} ifelse} ifelse} forall} def
- /MLshow { currentpoint stroke M
- 0 exch R
- Blacktext {gsave 0 setgray MFshow grestore} {MFshow} ifelse } bind def
- /MRshow { currentpoint stroke M
- exch dup MFwidth neg 3 -1 roll R
- Blacktext {gsave 0 setgray MFshow grestore} {MFshow} ifelse } bind def
- /MCshow { currentpoint stroke M
- exch dup MFwidth -2 div 3 -1 roll R
- Blacktext {gsave 0 setgray MFshow grestore} {MFshow} ifelse } bind def
- /XYsave { [( ) 1 2 true false 3 ()] } bind def
- /XYrestore { [( ) 1 2 true false 4 ()] } bind def
- Level1 SuppressPDFMark or
- {} {
- /SDict 10 dict def
- systemdict /pdfmark known not {
- userdict /pdfmark systemdict /cleartomark get put
- } if
- SDict begin [
- /Title ()
- /Subject (gnuplot plot)
- /Creator (gnuplot 5.0 patchlevel 5)
- % /Producer (gnuplot)
- % /Keywords ()
- /CreationDate (Wed Jul 5 16:40:47 2017)
- /DOCINFO pdfmark
- end
- } ifelse
- %
- % Support for boxed text - Ethan A Merritt May 2005
- %
- /InitTextBox { userdict /TBy2 3 -1 roll put userdict /TBx2 3 -1 roll put
- userdict /TBy1 3 -1 roll put userdict /TBx1 3 -1 roll put
- /Boxing true def } def
- /ExtendTextBox { Boxing
- { gsave dup false charpath pathbbox
- dup TBy2 gt {userdict /TBy2 3 -1 roll put} {pop} ifelse
- dup TBx2 gt {userdict /TBx2 3 -1 roll put} {pop} ifelse
- dup TBy1 lt {userdict /TBy1 3 -1 roll put} {pop} ifelse
- dup TBx1 lt {userdict /TBx1 3 -1 roll put} {pop} ifelse
- grestore } if } def
- /PopTextBox { newpath TBx1 TBxmargin sub TBy1 TBymargin sub M
- TBx1 TBxmargin sub TBy2 TBymargin add L
- TBx2 TBxmargin add TBy2 TBymargin add L
- TBx2 TBxmargin add TBy1 TBymargin sub L closepath } def
- /DrawTextBox { PopTextBox stroke /Boxing false def} def
- /FillTextBox { gsave PopTextBox 1 1 1 setrgbcolor fill grestore /Boxing false def} def
- 0 0 0 0 InitTextBox
- /TBxmargin 20 def
- /TBymargin 20 def
- /Boxing false def
- /textshow { ExtendTextBox Gshow } def
- %
- % redundant definitions for compatibility with prologue.ps older than 5.0.2
- /LTB {BL [] LCb DL} def
- /LTb {PL [] LCb DL} def
- end
- %%EndProlog
|