[R] xfig device
Brian Kurotsuchi
bkurotsu at toocool.itslab.calpoly.edu
Mon Mar 8 18:04:35 CET 1999
Here's a regression plot that I wanted to put in a document. Aladdin
Ghostscript 4.03 and 5.10 both choke on it. I would attach this stuff, but I
don't really like MIME.
BK
------- error output -------
imbalance:~/stat322/12.24> gs -sDEVICE=ljet4 -sOutputFile=foo.pcl -r600
regression.ps
Aladdin Ghostscript 4.03 (1996-9-23)
Copyright (C) 1996 Aladdin Enterprises, Menlo Park, CA. All rights reserved.
This software comes with NO WARRANTY: see the file PUBLIC for details.
Error: /undefinedfilename in (regression.ps)
Operand stack:
Execution stack:
%interp_exit () --nostringval-- --nostringval-- --nostringval--
%false --nostringval-- --nostringval--
Dictionary stack:
--dict:680/701-- --dict:0/20-- --dict:44/200--
Current allocation mode is local
Last OS error: 2
GS>
------- input file -------
%!PS-Adobe-3.0
%%DocumentFonts: Helvetica Helvetica-Bold Helvetica-Oblique
%%+ Helvetica-BoldOblique Symbol
%%DocumentMedia: a4 595 841 0 ()
%%Title: R Graphics Output
%%Creator: R Software
%%Pages: (atend)
%%Orientation: Landscape
%%BoundingBox: 18 18 524 577
%%EndComments
%%BeginProlog
/gs { gsave } def
/gr { grestore } def
/bp { gs 595.00 0 translate 90 rotate} def
/ep { showpage gr } def
/m { moveto } def
/l { lineto } def
/np { newpath } def
/cp { closepath } def
/f { fill } def
/o { stroke } def
/c { newpath 0 360 arc } def
/r { 3 index 3 index moveto 1 index 4 -1 roll
lineto exch 1 index lineto lineto closepath } def
/p1 { stroke } def
/p2 { bg setrgbcolor fill fg setrgbcolor } def
/p3 { gsave bg setrgbcolor fill grestore stroke } def
/t { 6 -2 roll moveto gsave 3 index true
charpath flattenpath pathbbox grestore gsave
5 -1 roll rotate 6 -1 roll neg 3 -1 roll 5 -1
roll sub mul 4 -1 roll neg 3 -1 roll 4 -1 roll
sub mul rmoveto show grestore } def
/cl { initclip newpath 3 index 3 index moveto 1 index
4 -1 roll lineto exch 1 index lineto lineto
closepath clip newpath } def
/rgb { setrgbcolor } def
/s { scalefont setfont } def
/R { /Font1 findfont } def
/B { /Font2 findfont } def
/I { /Font3 findfont } def
/BI { /Font4 findfont } def
/S { /Font5 findfont } def
/Helvetica findfont
dup length dict begin
{1 index /FID ne {def} {pop pop} ifelse} forall
/Encoding ISOLatin1Encoding def
currentdict
end
/Font1 exch definefont pop
/Helvetica-Bold findfont
dup length dict begin
{1 index /FID ne {def} {pop pop} ifelse} forall
/Encoding ISOLatin1Encoding def
currentdict
end
/Font2 exch definefont pop
/Helvetica-Oblique findfont
dup length dict begin
{1 index /FID ne {def} {pop pop} ifelse} forall
/Encoding ISOLatin1Encoding def
currentdict
end
/Font3 exch definefont pop
/Helvetica-BoldOblique findfont
dup length dict begin
{1 index /FID ne {def} {pop pop} ifelse} forall
/Encoding ISOLatin1Encoding def
currentdict
end
/Font4 exch definefont pop
/Font5 /Symbol findfont definefont
1 setlinecap 1 setlinejoin
%%EndProlog
%%Page: 1 1
bp
R 10 s
0.75 setlinewidth
/fg { 0.0000 0.0000 0.0000 } def fg rgb
77.04 91.44 793.65 518.24 cl
77.04 91.44 793.65 518.24 cl
0.75 setlinewidth
[] 0 setdash
103.58 502.43 2.75 c p1
324.76 393.69 2.75 c p1
545.93 263.73 2.75 c p1
545.93 231.90 2.75 c p1
767.11 107.25 2.75 c p1
18.00 18.00 823.89 577.28 cl
np
103.58 91.44 m
767.11 91.44 l
o
np
103.58 91.44 m
103.58 84.24 l
o
np
214.17 91.44 m
214.17 84.24 l
o
np
324.76 91.44 m
324.76 84.24 l
o
np
435.34 91.44 m
435.34 84.24 l
o
np
545.93 91.44 m
545.93 84.24 l
o
np
656.52 91.44 m
656.52 84.24 l
o
np
767.11 91.44 m
767.11 84.24 l
o
R 12 s
103.58 65.52 (400) 0.50 0.00 0.00 t
214.17 65.52 (500) 0.50 0.00 0.00 t
324.76 65.52 (600) 0.50 0.00 0.00 t
435.34 65.52 (700) 0.50 0.00 0.00 t
545.93 65.52 (800) 0.50 0.00 0.00 t
656.52 65.52 (900) 0.50 0.00 0.00 t
767.11 65.52 (1000) 0.50 0.00 0.00 t
np
77.04 131.12 m
77.04 396.34 l
o
np
77.04 131.12 m
69.84 131.12 l
o
np
77.04 263.73 m
69.84 263.73 l
o
np
77.04 396.34 m
69.84 396.34 l
o
59.76 131.12 (30) 0.50 0.00 90.00 t
59.76 263.73 (35) 0.50 0.00 90.00 t
59.76 396.34 (40) 0.50 0.00 90.00 t
np
77.04 91.44 m
793.65 91.44 l
793.65 518.24 l
77.04 518.24 l
cp p1
435.34 36.72 (x) 0.50 0.00 0.00 t
30.96 304.84 (y) 0.50 0.00 90.00 t
77.04 91.44 793.65 518.24 cl
np
94.26 518.24 m
793.65 97.61 l
o
ep
%%Trailer
%%Pages: 1
%%EOF
------ end input file ------
Quoting Peter Dalgaard BSA (p.dalgaard at biostat.ku.dk):
> Brian Kurotsuchi <bkurotsu at toocool.itslab.calpoly.edu> writes:
>
> > Actually I did remember to dev.off(). I'm inserting the graphic into a LaTeX
> > document and then using gs to print it. What happens is that gs processes
> > most of the document and then spits out an error just before it finishes.
> >
> > I can actually print the partial file it creates by running gs manually and
> > directing the output file to the printer device. The problem is that I
> > normally send the document (as postscript from dvips) through lp which
> > automagically runs gs (Solaris print filter system) and directs that to the
> > device. Of course an error code from gs causes the filtering to abort and I
> > get no output.
>
> Hmm. What was the error code and what were you trying to print? (I.e.
> can you boil it down to a file of a manageable size?)
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !) To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
More information about the R-help
mailing list