title: Y axis out of plotting region with barplot() in R
body: <p>I'm having problems getting the y axis on a horizontal barplot() within the plotting region. See this example, I thought that using ylim and/or yaxp would stop this going off the plotting region, but it doesn't seem to work. </p>
  
  <p>I've tried to reproduce the set up I've got:</p>
  
  <pre><code>x &lt;- matrix(abs(rnorm(34)), nrow = 34, ncol = 3)
  rownames(x) &lt;- c(seq(0,6600,200))
  barplot(x[,3], horiz=TRUE, space = 0.4, main = "Title", las=1, cex.names=0.8, ylab="y label")
  </code></pre>
  
  <p>But the axis goes of the plotting region if I add ylim:</p>
  
  <pre><code>barplot(x[,3], horiz=TRUE, space = 0.4, ylim = c(0,25), yaxp=c(0,25,1), main = "Title", las=1, cex.names=0.8, ylab="y label")
  </code></pre>