title: ggplot2 and gridExtra: reduce spacing among plots that have facet strips removed
body: <p>I wish to plot a number of tightly spaced graphs as illustrated by the following toy example:</p>
  
  <pre><code>library(ggplot2)
  library(gridExtra)
  set.seed(314159)
  n &lt;- 100
  data &lt;- data.frame(x = rnorm(n), y = rnorm(n), z = rep("dummy var", n))
  
  p00 &lt;- ggplot(data, aes(x)) + stat_density() + theme(plot.margin = unit(c(0,0,0,0), units = "lines" ), axis.text = element_blank(), axis.title = element_blank(), axis.ticks = element_blank()) + labs(x = NULL, y = NULL)
  p01 &lt;- ggplot(data, aes(x, y)) + geom_point() + theme(plot.margin = unit(c(0,0,0,0), units = "lines" ), axis.text = element_blank(), axis.title = element_blank(), axis.ticks = element_blank()) + labs(x = NULL, y = NULL)
  p10 &lt;- ggplot(data, aes(y, x)) + geom_point() + theme(plot.margin = unit(c(0,0,0,0), units = "lines" ), axis.text = element_blank(), axis.title = element_blank(), axis.ticks = element_blank()) + labs(x = NULL, y = NULL)
  p11 &lt;- ggplot(data, aes(y)) + stat_density() + theme(plot.margin = unit(c(0,0,0,0), units = "lines" ), axis.text = element_blank(), axis.title = element_blank(), axis.ticks = element_blank()) + labs(x = NULL, y = NULL)
  
  grid.arrange(p00, p01, p10, p11, ncol = 2)
  </code></pre>
  
  <p>In spite of my best efforts, I have been unable to overcome a complication that arises when I attempt to do so after having removed the facet strips from my graphs. In the following example, I have added horizontal and vertical strips to each graph by faceting on a dummy variable: </p>
  
  <pre><code>p00 &lt;- p00 + facet_grid(z ~ z)
  p01 &lt;- p01 + facet_grid(z ~ z)
  p10 &lt;- p10 + facet_grid(z ~ z)
  p11 &lt;- p11 + facet_grid(z ~ z)
  
  grid.arrange(p00, p01, p10, p11, ncol = 2)
  </code></pre>
  
  <p>Next I remove the strips according to the procedure outlined in <a href="https://stackoverflow.com/questions/17144182/ggplot2-and-gridextra-completely-remove-strip-in-facet-grid-not-just-invisibl">this post</a>. However, the resulting graphs are rather widely spaced by comparison:</p>
  
  <pre><code>p00 &lt;- p00 + theme(plot.margin = unit(c(0,0.5,0.5,0), units = "lines" ), strip.background = element_blank(), strip.text = element_blank())
  p01 &lt;- p01 + theme(plot.margin = unit(c(0,0.5,0.5,0), units = "lines" ), strip.background = element_blank(), strip.text = element_blank())
  p10 &lt;- p10 + theme(plot.margin = unit(c(0,0.5,0.5,0), units = "lines" ), strip.background = element_blank(), strip.text = element_blank())
  p11 &lt;- p11 + theme(plot.margin = unit(c(0,0.5,0.5,0), units = "lines" ), strip.background = element_blank(), strip.text = element_blank())
  
  grid.arrange(p00, p01, p10, p11, ncol = 2)
  </code></pre>
  
  <p>Any suggestions on how to reduce the spacing between graphs would be much appreciated.</p>