I am new to the R language. I am trying to plot multiple figures on one page
through a loop, but the code just produce one graph on one page. Can someone
show some light on what's wrong?
Here is my code:
library("quantreg")
tcdata<-read.table("mydata.txt",header=TRUE)
postscript("myfigure.ps")
basins<- paste(c("b1","b2","b3","b4","b5","b6"),sep="")
par(mfrow = c(2,3),mar=c(0,4,0,2),oma=c(5,0,3,0))
for (k in 1:6) {
data0=subset(tcdata,basin==basins[k])
attach(data0)
model=rq(rain~year,tau=seq(0.1,0.9,0.1))
plot(summary(model,alpha=0.05,se="iid"),parm=2,pch=19,cex=1.2,mar=c(5,5,5,5),
ylab=" ",xlab=" ")
}
dev.off()
--
View this message in context: http://r.789695.n4.nabble.com/plotting-multiple-figures-on-one-page-tp3382981p3382981.html
Sent from the R help mailing list archive at Nabble.com.