I am trying to create a grid of plots, which should have a box around them, a chessboard-like labelling (i.e., letters at top/bottom, numbers at the sides), as well as a vertical line separating two halfs of the grid.
I was hoping to get it done (or something similar enough) using faceting, but facet_grid does not create sideways labels (like here) when given a large number of plots, it appears:
testdata <- cbind("ID"=c(rep(1:24, each=10)),
"TT"=c(rep(0:1, each=5)),
"RD"=c(seq(1:5)),
"DV"=rnorm(240, 10, 5))
testdata <- data.frame(testdata)
testplot <- ggplot(data=testdata, aes(x=RD, y=DV)) +
geom_line(colour="black") + geom_point() +
facet_wrap(TT ~ ID, ncol=4)
(The other problem with facet_wrap is that it does not deal well with the ID ~ TT ordering I'd prefer, displaying these values as [1,0], [1,1], [2,0], [2,1] then; rather than the preferable [1,0], [2,0], [3,0], [1,1], [2,1]... but that could be worked around.)
Another option I've considered is using box(); however, this only works around individual plots (creating an object with grid.arrange / arrangeGrob does not work).
Ultimately, I'd like a plot roughly as below. I'd be happy about any suggestions!