[R] White lines on persp plots in pdf format

Miguel Lacerda Miguel.Lacerda at uct.ac.za
Thu Nov 17 17:13:24 CET 2011


Hi,

I am using the persp function to plot 3D surfaces, but the plots have
"little white lines" when I print them to a pdf file (visible in
Acrobat, Foxit, Evince, Xpdf and Gimp). This does not happen when I
create png or tiff images. Here is some sample code:

pdf("test.pdf")

x <- seq(0,1,length=101)

f <- dnorm(x, 0, 0.25)

z <- c()

for(i in 1:100) z <- cbind(z,f)

persp(z, col="red",theta=40, phi=10, shade=1.5, d=4, border=NA)

dev.off()

The resulting graph is attached. Anyone know how to get rid of the
"little white lines"?

Thanks!
Miguel
-------------- next part --------------
A non-text attachment was scrubbed...
Name: test.pdf
Type: application/pdf
Size: 176804 bytes
Desc: not available
URL: <https://stat.ethz.ch/pipermail/r-help/attachments/20111117/24d5a8b4/attachment.pdf>


More information about the R-help mailing list