Re: [Rd] postscript bug? (PR#9803)

From: Peter Dalgaard <P.Dalgaard_at_biostat.ku.dk>
Date: Mon, 23 Jul 2007 12:36:22 +0200

s.blomberg1_at_uq.edu.au wrote:
> postscript() produces files that are not encoded as eps, according to
> the standard. Hence, word processors such as OpenOffice and AbiWord do
> not recognise the files as eps. See
> http://www.postscript.org/FAQs/language/node80.html
>
> The problem is in the first line of the postscript file: The header is
> wrong. It should be:
>
> %!PS-Adobe-3.0 EPSF-3.0
>
> whereas postscript() produces:
>
> %!PS-Adobe-3.0
>
> The following code replicates the problem:
>
> x <- rnorm(10)
> y <- rnorm(10)
> postscript("test.eps")
> plot(x,y)
> dev.off()
>
> # Now try importing test.eps into your favorite word processor.
>
> # Now edit test.eps and change the header to the correct header above,
> and try importing the file again. Works! (This took me a couple of hours
> of hair-pulling to figure out. I sure hope it is a genuine bug. :-) )
>
It isn't a bug. It is as it should be, because a plot file with multiple pages cannot be EPS.

Try reading the help page for postscript again, this time ( ;-) ) paying attention to the 'onefile' argument.

-- 
   O__  ---- Peter Dalgaard             Ă˜ster Farimagsgade 5, Entr.B
  c/ /'_ --- Dept. of Biostatistics     PO Box 2099, 1014 Cph. K
 (*) \(*) -- University of Copenhagen   Denmark          Ph:  (+45) 35327918
~~~~~~~~~~ - (p.dalgaard_at_biostat.ku.dk)                  FAX: (+45) 35327907

______________________________________________
R-devel_at_r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel
Received on Mon 23 Jul 2007 - 10:39:00 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Tue 24 Jul 2007 - 08:36:52 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-devel. Please read the posting guide before posting to the list.