title: several hexbin plots on one PDF page in R
body: <p>I'm trying to create a PDF with a number of <code>hexbin</code> plots where I'd like to have a particular number of plots per page.</p>
  
  <p>This one works:</p>
  
  <pre><code>PDFPath = "C:\\temp\\some.pdf"
  pdf(file=PDFPath)  
  par(mfrow = c(2,2))
  for (i in seq(5,10))   
  {    
    VAR1 = rnorm(i)  
    VAR2 = rnorm(i)  
    plot(VAR1, VAR2)
  } 
  dev.off() 
  </code></pre>
  
  <p>This one doesn't work. It only generates one plot per page:</p>
  
  <pre><code>library(hexbin)
  PDFPath = "C:\\temp\\some.pdf"
  pdf(file = PDFPath)  
  par(mfrow = c(2,2))
  for (i in seq(5,10))   
  {     
    VAR1 = rnorm(i)  
    VAR2 = rnorm(i)  
    plot(hexbinplot(VAR1 ~ VAR2))
  } 
  dev.off() 
  </code></pre>
  
  <p>Any ideas on what's going wrong?</p>
  
  <p>EDIT:</p>
  
  <p>I've just noticed that the reason is that <code>mfrow</code> only refers to base graphics and not to grid graphis. Is there a way to achieve similar results for <code>hexbin</code>?</p>