# # Reproducible example. # egDat <- dget("egDat.txt") library(ggforce) # This uses facet_grid() and the result is really pretty useless. plotObj1 <- ggplot(egDat) + geom_point(aes(y=obsd,x=x),na.rm=TRUE,shape=20,colour="blue") + geom_line(aes(y=fit2,x=cPred)) + facet_grid(cols=vars(Trt)) + theme_bw() # This demonstrates the one row per page phenomenon. plotObj2 <- vector("list",6) for(pg in 1:6) { plotObj2[[pg]] <- ggplot(egDat) + geom_point(aes(y=obsd,x=x),na.rm=TRUE,shape=20,colour="blue") + geom_line(aes(y=fit2,x=cPred)) + facet_grid_paginate(facets=~Trt,ncol=4,nrow=3,page=pg) + theme_bw() }