Patrizio Frederic
2008-Aug-01 09:33 UTC
[R] contour lines in windows device but neither in pdf nor in postscript
library(mvtnorm) x = seq(-4,4,length=201) xy = expand.grid(x,x) sigma = (diag(c(1,1))+1)/2 d2 = matrix(dmvnorm(xy,sigma=sigma),201) xsamp = rmvnorm(200,sigma=sigma) contour(x,x,d2) points(xsamp,col=3,pch=16) pdf("pdftry.pdf") contour(x,x,d2) points(xsamp,col=3,pch=16) dev.off() postscript("pstry.ps") contour(x,x,d2) points(xsamp,col=3,pch=16) dev.off() # I can see contour lines in a window device but I can't see them in files pdftry.pdf and pstry.ps> version_ platform i386-pc-mingw32 arch i386 os mingw32 system i386, mingw32 status major 2 minor 7.1 year 2008 month 06 day 23 svn rev 45970 language R version.string R version 2.7.1 (2008-06-23) what's going wrong? Thanks in advance, Regards, Patrizio Frederic
Mark Difford
2008-Aug-01 10:13 UTC
[R] contour lines in windows device but neither in pdf nor in postscript
Hi Patrizio,>> # I can see contour lines in a window device but I can't see them in >> files pdftry.pdf and pstry.psNo problem with either format on my system, though I am using 2.7.1 patched. It's not mentioned as a bug fix for the patched version so surely was working in 2.7.1. Probably something local. HTH, Mark. platform i386-pc-mingw32 arch i386 os mingw32 system i386, mingw32 status Patched major 2 minor 7.1 year 2008 month 06 day 27 svn rev 46012 language R version.string R version 2.7.1 Patched (2008-06-27 r46012) Patrizio Frederic wrote:> > library(mvtnorm) > x = seq(-4,4,length=201) > xy = expand.grid(x,x) > sigma = (diag(c(1,1))+1)/2 > d2 = matrix(dmvnorm(xy,sigma=sigma),201) > xsamp = rmvnorm(200,sigma=sigma) > > contour(x,x,d2) > points(xsamp,col=3,pch=16) > > pdf("pdftry.pdf") > contour(x,x,d2) > points(xsamp,col=3,pch=16) > dev.off() > > postscript("pstry.ps") > contour(x,x,d2) > points(xsamp,col=3,pch=16) > dev.off() > > # I can see contour lines in a window device but I can't see them in > files pdftry.pdf and pstry.ps >> version > _ > platform i386-pc-mingw32 > arch i386 > os mingw32 > system i386, mingw32 > status > major 2 > minor 7.1 > year 2008 > month 06 > day 23 > svn rev 45970 > language R > version.string R version 2.7.1 (2008-06-23) > > what's going wrong? > > Thanks in advance, > Regards, > > Patrizio Frederic > > ______________________________________________ > R-help at r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide > http://www.R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code. > >-- View this message in context: http://www.nabble.com/contour-lines-in-windows-device-but-neither-in-pdf-nor-in-postscript-tp18771094p18771537.html Sent from the R help mailing list archive at Nabble.com.
Prof Brian Ripley
2008-Aug-01 10:21 UTC
[R] contour lines in windows device but neither in pdf nor in postscript
What viewers are you using? Works for me (using ghostscript 4.61 and acroread 8.1.2) -- I even tried 2.7.1 (as well as R-patched). On Fri, 1 Aug 2008, Patrizio Frederic wrote:> library(mvtnorm) > x = seq(-4,4,length=201) > xy = expand.grid(x,x) > sigma = (diag(c(1,1))+1)/2 > d2 = matrix(dmvnorm(xy,sigma=sigma),201) > xsamp = rmvnorm(200,sigma=sigma) > > contour(x,x,d2) > points(xsamp,col=3,pch=16) > > pdf("pdftry.pdf") > contour(x,x,d2) > points(xsamp,col=3,pch=16) > dev.off() > > postscript("pstry.ps") > contour(x,x,d2) > points(xsamp,col=3,pch=16) > dev.off() > > # I can see contour lines in a window device but I can't see them in > files pdftry.pdf and pstry.ps >> version > _ > platform i386-pc-mingw32 > arch i386 > os mingw32 > system i386, mingw32 > status > major 2 > minor 7.1 > year 2008 > month 06 > day 23 > svn rev 45970 > language R > version.string R version 2.7.1 (2008-06-23) > > what's going wrong? > > Thanks in advance, > Regards, > > Patrizio Frederic > > ______________________________________________ > R-help at r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide http://www.R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code. >-- Brian D. Ripley, ripley at stats.ox.ac.uk Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/ University of Oxford, Tel: +44 1865 272861 (self) 1 South Parks Road, +44 1865 272866 (PA) Oxford OX1 3TG, UK Fax: +44 1865 272595