[R] pdf() function, screen command and graphs
Dominique Couturier
dominique.couturier at unine.ch
Sat Dec 6 19:57:14 CET 2003
Dear [R]-list,
I am trying to do a pdf() of the following graphs but don't understand
why the pdf() function does produce an empty pdf file.
(I use R1.7.0 on MacOS 10.2.8)
any idea? Is pdf() incompatible with screen?
Thanks a lot,
DLC
## create dataset
x=rnorm(1000,10,2)
y=rpois(1000,5)
## graphs
pdf()
par(col.main=4,omi=c(0,0,1.25,0))
split.screen(c(1,2))
screen(1);split.screen(c(2,1))
screen(3) ## gauche en haut
boxplot(x,col=3,main="my boxplot")
screen(2) ## droite seul
barplot(table(y),col=4,main="my barplot")
screen(4) ## gauche en bas
qqnorm(x,main="mon qqnorm");qqline(x,col=5)
mtext(paste("Graphics are important","\n","I love
R"),side=3,col=2,cex=1.5,outer=T)
dev.off()
## remove dataset
rm(x,y)
More information about the R-help
mailing list