Here is an example with ggplot2, which can also be used in a similar way with
lattice. Again, the last page is the problem: the arrangement is correct
here, but the last page (with 1 instead of 5 plots) has a different panel
size which makes a comparison difficult.

And, since I have much more points per panel: ggplot2 is slow compared to
lattice.

Dieter

library(ggplot2)
nsubj = 11
dt = expand.grid(time=1:20,comp=LETTERS[1:3],subj=letters[1:nsubj])
dt$val = rnorm(nrow(dt))
nPerPage = 5
for (i in seq(1,nsubj,by=nPerPage)) {
  subjs = i:max(i+nPerPage-1,nPerPage)
  print(subjs)
  p = qplot(time,val,data=subset(dt,as.integer(subj) %in% subjs )) +
    geom_line()+ facet_grid(comp ~ subj)+opts(aspect.ratio=1)
  print(p)
}

-- 
View this message in context: 
http://r.789695.n4.nabble.com/Layout-of-mulitpage-conditioned-lattice-plots-tp3094581p3094775.html
Sent from the R help mailing list archive at Nabble.com.

______________________________________________
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