[Rd] R bug or ghostscript bug or my bug?

ivo welch ivowel at gmail.com
Mon Jan 19 20:52:22 CET 2009


Dear R developers:

The following R program produces a pdf file that does not survive
ghostscript distillation correctly.  The undistilled version is at
http://welch.econ.brown.edu/temp/try.PDF while the distilled version
is at http://welch.econ.brown.edu/temp/try.pdf .  When previewed, the
points are wrong in the distilled .pdf version, but only in one of the
two points invokations (huh?) .  The program that generated the pdf
files is

x= 1:10; y1= x; y2= y1/2;

plot.one = function( x, y ) {
  lines( x, y, col="blue");
  points( x, y, col="blue", pch=21, cex=1);
}

pdf(file = "try.PDF")

plot(0, type="n", xlim=c(1,10), ylim=c(1,10))

plot.one( x, y1 )
plot.one( x, y2)

dev.off()

system("ps2pdf14  try.PDF try.pdf")  # distillation.

-----------------------------

Obviously, the error can be in ghostscript, not in R.  Or it can be
that R produces a pdf file that has some slight problems that do not
usually show up, except when distilled.


Before I get too badly flamed, feel free to ignore this.  I am just
trying to help.  It took me some time to whittle down the program to
isolate the problem.


R was invoked under OSX via "R --vanilla" and is version 2.8.1.

ghostscript is 8.62 (2008-02-29) under OSX.

(It should be easy to check whether this also occurs under linux.)

/iaw



More information about the R-devel mailing list