I would like to create a series of figures contaning 6 or less plots within a 2x3 layout. In case if there is a figure with less than 6 plots I would like to have borders to see the structure of the layout.
For example this code gives the following figure:
n <- 3
data0 <- expand.grid(g = LETTERS[1:3], x=1:10)
data0$y <- data0$x + rnorm(nrow(data0))
xyplot(y~x|g, data=data0, layout=c(2,3), as.table=TRUE)
I would like to create something like this:
Any idea how to do this?


