title: How to get R plot window size?
body: <p>How can I get the size of the plot window in R? I've been using xwininfo, but there must be a function or variable in R to extract the current plot height and width.</p>
  
  <p><em>UPDATE</em></p>
  
  <p>This works as a <code>savePlot()</code> replacement if you don't have Cairo support and you want to export plots to Windows or other 100 dpi devices:</p>
  
  <pre><code>dev.copy(png, "myplot.png", width=dev.size("px")[1], height=dev.size("px")[2], 
           res=100, bg="transparent")
  dev.off()
  </code></pre>