title: Error in plot.new() : figure margins too large in R
body: <p>I'm new to R but I've made numerous correlation plots with smaller data sets. However, when I try to plot a large dataset (2gb+), I can produce the plot just fine, but the legend doesn't show up. Any advice? or alternatives?</p>
  
  <pre><code>library(gplots)
  r.cor &lt;- cor(r)
  layout(matrix(c(1,1,1,1,1,1,1,1,2,2), 5, 2, byrow = TRUE))
  par(oma=c(5,7,1,1))
  cx &lt;- rev(colorpanel(25,"yellow","black","blue"))
  leg &lt;- seq(min(r.cor,na.rm=T),max(r.cor,na.rm=T),length=10)
  image(r.cor,main="Correlation plot Normal/Tumor data",axes=F,col=cx)
  axis(1, at=seq(0,1,length=ncol(r.cor)), labels=dimnames(r.cor)[[2]], 
      cex.axis=0.9,las=2)
  axis(2,at=seq(0,1,length=ncol(r.cor)), labels=dimnames(r.cor)[[2]],
       cex.axis=0.9,las=2)
  image(as.matrix(leg),col=cx,axes=T)     
  </code></pre>
  
  <blockquote>
    <p>Error in <code>plot.new()</code> : figure margins too large</p>
  </blockquote>
  
  <pre><code>tmp &lt;- round(leg,2)
  axis(1,at=seq(0,1,length=length(leg)), labels=tmp,cex.axis=1)
  </code></pre>