title: Plot completely without borders
body: <p>I set up a nice plot with a transparent superimposed scatterplot on a png image file. I want my plot window and my pdf output to be of the exact same size as my png- 962x745.</p>
  
  <p>However, even after turning off axes, annotations and frames, R still leaves a border around the image.</p>
  
  <p>This can be shown with an easy example: This plot shows two dots, which should be at the outermost ends of the plot. But they aren't:</p>
  
  <pre><code>plot(rbind(c(1,745),c(962,1)),bty ="n",axes=F,frame.plot=F, xaxt='n', ann=FALSE, yaxt='n', asp=745/962)
  </code></pre>
  
  <p>And together with the PDF device:</p>
  
  <pre><code>pdf(width=10.02,height=7.76)
  par(mar=rep(0, 4),mai=rep(0, 4), xpd = NA) 
  plot(rbind(c(1,745),c(962,1)),bty ="n",axes=F,frame.plot=F, xaxt='n', ann=FALSE, yaxt='n', asp=745/962)
  dev.off()
  </code></pre>