Re: [R] Changing layout in grid.arrange

2015-05-08 Thread Roy Mendelssohn - NOAA Federal
Thanks, it took some digging in the internet, but I figured out how to do it. The first thing is how to pass options to grid.arrange when used in do.call. It takes a list, which I tried in several different ways, the list has to be of a certain form, so something like: > args.list <- c(plots,

Re: [R] Changing layout in grid.arrange

2015-05-08 Thread Jim Lemon
Hi Roy, If this helps, you can get the layout like this: split.screen(figs=matrix(c(rep(0,5),rep(0.5,10),rep(1,5), rep(seq(0.8,0,by=-0.2),2),rep(seq(1,0.2,by=-0.2),2)),ncol=4)) for(scr in 1:10) { screen(scr) par(mar=c(0,0,0,0)) plot(0.5,0.5,xlim=c(0,1),ylim=c(0,1), axes=FALSE,xlab="",ylab=""

[R] Changing layout in grid.arrange

2015-05-08 Thread Roy Mendelssohn - NOAA Federal
Hi All: I am doing something very similar to the the example in the grid.arrange package: require(ggplot2) plots = lapply(1:10, function(.x) qplot(1:10,rnorm(10), main=paste("plot",.x))) require(gridExtra) do.call(grid.arrange, plots) If you run this, the layout is 4 rows and 3 columns with g