[R] contour lines in windows device but neither in pdf nor in postscript
Patrizio Frederic
frederic.patrizio at gmail.com
Fri Aug 1 11:33:52 CEST 2008
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
More information about the R-help
mailing list