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@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.