Hi all,
    I'm trying to generate a grid of four plots.  The first 2 appear
just fine, but the final 2 will not appear in the grid, instead
overwriting the first two.    Any ideas on how to get them all in the
same window would be greatly appreciated.

Cheers,
Jonathan

library(fields)

par(mfrow=c(2,2)) #2x2 plot windows
plot(c(2,4),c(2,2))  # works fine
plot(c(2,4),c(2,2))  # works fine

  x <- 1:4
  y <- 5:10
  z <- matrix(0,length(x),length(y))
  z2 <- matrix(0,length(x),length(y))
  for(i in 1:length(x))
  {
    for (j in 1:length(y))
    {
        z[i,j] <- sample(4:10,1)
        z2[i,j] <- sample(4:10,1)
    }
  }

  filled.contour(x,y,z,color.palette=topo.colors)  # doesn't work
  image.plot(x,y,z2,add=TRUE)  # doesn't work

______________________________________________
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