I am scratching my head for the following code.
I am following this example:
How can I arrange an arbitrary number of ggplots using grid.arrange?
I wanted to collect the plots and lay them out on a 3x9 grid and each grid with suitable labels...
But it doesn't work. The pdf generated is still one-plot-per-page - so there are 27 pages generated.
I am trying to use "grid.arrange", however, the function "plotFunctionWrittenByOtherPeople" was written by other people, and it doesn't return a handle to the plot... and it's quite complicated.
How to arrange the plots nicely?
Could anybody please shed some lights on this?
Thanks a lot!
pdf("mytry1.pdf", width = 11, height = 8.5)
par(mfrow=c(3, 9))
for (a in seq(100, 900, by=100))
for (b in c(1, 3, 6))
{
plotFunctionWrittenByOtherPeople(a, b)
}
dev.off()