[Rd] postscript bug? (PR#9803)

From: <s.blomberg1_at_uq.edu.au>
Date: Mon, 23 Jul 2007 12:10:39 +0200 (CEST)


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. :-) )

Cheers,

Simon.

Version:
 platform = x86_64-pc-linux-gnu
 arch = x86_64
 os = linux-gnu
 system = x86_64, linux-gnu
 status =
 major = 2
 minor = 5.1
 year = 2007
 month = 06
 day = 27
 svn rev = 42083
 language = R
 version.string = R version 2.5.1 (2007-06-27)

Locale:

LC_CTYPE=en_AU.UTF-8;LC_NUMERIC=C;LC_TIME=en_AU.UTF-8;LC_COLLATE=en_AU.UTF-8;LC_MONETARY=en_AU.UTF-8;
LC_MESSAGES=en_AU.UTF-8;LC_PAPER=en_AU.UTF-8;LC_NAME=C;LC_ADDRESS=C;LC_TELEPHONE=C;
LC_MEASUREMENT=en_AU.UTF-8;LC_IDENTIFICATION=C

Search Path:
 .GlobalEnv, package:stats, package:graphics, package:grDevices, package:utils, package:datasets, package:methods, Autoloads, package:base

-- 
Simon Blomberg, BSc (Hons), PhD, MAppStat. 
Lecturer and Consultant Statistician 
Faculty of Biological and Chemical Sciences 
The University of Queensland 
St. Lucia Queensland 4072 
Australia
Room 320 Goddard Building (8)
T: +61 7 3365 2506 
email: S.Blomberg1_at_uq.edu.au

Policies:
1.  I will NOT analyse your data for you.
2.  Your deadline is your problem.

The combination of some data and an aching desire for 
an answer does not ensure that a reasonable answer can 
be extracted from a given body of data. - John Tukey.

______________________________________________
R-devel_at_r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel
Received on Mon 23 Jul 2007 - 10:21:43 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 Mon 23 Jul 2007 - 11:36:39 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.