Dear All,

I made a function which gives 3 plots in one window(I used
par(mfrow=c(1,3)) in the function).
Using that function 3 times, I want to produce 9 plots in one window.
I tried par(mfrow=c(3,1)) or par(mfrow=c(3,3)) but it didn't work.

For example,

pf <- function(p) {
  par(mfrow=c(1,3))
  plot(c(p:(p+10)),c(1:11))
  plot(c(p:(p+10)),c(2:12))
  plot(c(p:(p+10)),c(3:13))
}
p <- c(1:3)
 par(mfrow=c(3,1))
for(i in 1:3) {
  pf(p[i])
}

How can I produce 9 plots or 3*n plots when I use that function n times?

Thank you ahead,
Soyeon

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

Reply via email to