title: Removing margins from map plots
body: <p>I can't seem to remove the margins from plots of spatial objects. Solutions posted to other types of plots don't seem to work in this case.  Par's <code>mai</code> and <code>oma</code> arguments also fail.  Very grateful for advice.</p>
  
  <pre><code>library(maptools)
  data(wrld_simpl)
  bbox = cbind(c(179,179,-179,-179,179), c(89,-89,-89,89,89))
  
  png('test.png', width=1000, height=500)
  par(mai=c(0,0,0,0), oma=c(0,0,0,0))
  plot(wrld_simpl, col='grey', bg='white', border=NA)
  lines(bbox, col='red', lwd=3)
  dev.off()
  browseURL('test.png')
  </code></pre>
  
  <p>The red bounding box should plot just inside the graphical output border.</p>
  
  <p><img src="https://i.stack.imgur.com/ZYV3d.png" alt="enter image description here"></p>