title: How to draw a border around a barplot in R the same way a border is drawn for a boxplot
body: <p>I'm trying to get the same effect of isolating the plot of a barplot in the same way R isolates a boxplot with a border by default. In other words, I want the border that appears in the first plot below to appear in the second plot:</p>
  
  <pre><code>par(mfrow=c(2,1))
  
  ## boxplot on a formula:
  boxplot(count ~ spray, data = InsectSprays, col = "lightgray")
  # *add* notches (somewhat funny here):
  boxplot(count ~ spray, data = InsectSprays,
          notch = TRUE, add = TRUE, col = "blue")
  
  
  require(grDevices) # for colours
  tN &lt;- table(Ni &lt;- stats::rpois(100, lambda=5))
  r &lt;- barplot(tN, col=rainbow(20))
  #- type = "h" plotting *is* 'bar'plot
  lines(r, tN, type='h', col='red', lwd=2)
  </code></pre>