title: Error in .External.graphics R
body: <p>I was using the function below to create a heatmap from a matrix of 48 columns X 32 rows:</p>
  
  <pre><code>heatmap.2(all.data,Rowv = FALSE, Colv = FALSE, trace="none",main="All data",col=colorRampPalette(c("green","yellow","red")))
  </code></pre>
  
  <p>It was giving me some warnings because of the removal of the dendograms, but still it gave me the heatmap I wanted plus the color key, something happend and now when I try to run the same it gives me the plot without the color key and an error:</p>
  
  <pre><code>Error in plot.new() : figure margins too large
  In addition: Warning messages:
  1: In heatmap.2(all.data, Rowv = FALSE, Colv = FALSE, trace = "none",  :
    Discrepancy: Rowv is FALSE, while dendrogram is `both'. Omitting row dendogram.
  2: In heatmap.2(all.data, Rowv = FALSE, Colv = FALSE, trace = "none",  :
    Discrepancy: Colv is FALSE, while dendrogram is `none'. Omitting column dendogram.
  </code></pre>
  
  <p>if I change the margins to 1 for all sides: </p>
  
  <pre><code>par(mar=c(1,1,1,1))
  heatmap.2(all.data,Rowv = FALSE, Colv = FALSE, trace="none",main="All data",col=colorRampPalette(c("green","yellow","red")))
  </code></pre>
  
  <p>and try again it doesn't make the heatmap and gives me this error:</p>
  
  <pre><code>Error in .External.graphics(C_layout, num.rows, num.cols, mat, as.integer(num.figures),  : 
    invalid graphics state
  In addition: Warning messages:
  1: In heatmap.2(all.data, Rowv = FALSE, Colv = FALSE, trace = "none",  :
    Discrepancy: Rowv is FALSE, while dendrogram is `both'. Omitting row dendogram.
  2: In heatmap.2(all.data, Rowv = FALSE, Colv = FALSE, trace = "none",  :
    Discrepancy: Colv is FALSE, while dendrogram is `none'. Omitting column dendogram.
  </code></pre>
  
  <p>I also tried adding to the function key=T, but the color key is still not appearing in the Heatmap, any help will be very much appreciated!!!  </p>