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>
On Nov 17, 2011, at 10:13 AM, Miguel Lacerda wrote:> 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! > MiguelSee: http://cran.r-project.org/doc/FAQ/R-FAQ.html#Why-are-there-unwanted-borders and the "Note" section of ?pdf. HTH, Marc Schwartz