title: Points Scale in R barplot
body: <p>i'm having troubles in a multi axis barplot. I have an X,Y axis with bars and dots in the same graph. The point is that I have to shown both of them in different scales</p>
  
  <p>While I can shown both (bars and dots) correctly, the problem comes when I try to set different scales in left and right axis. I dont know how to change the aditional axis scale, and how to bind the red dots to the right axis, and the bars to the left one.</p>
  
  <p>This is my code and what I get:</p>
  
  <pre><code>labels &lt;- value
  mp &lt;- barplot(height = churn, main = title, ylab = "% churn", space = 0, ylim = c(0,5))
  text(mp, par("usr")[3], labels = labels, srt = 45, adj = c(1.1,1.1), xpd = TRUE, cex=.9)
  
  # Population dots
  points(popul, col="red", bg="red", pch=21, cex=1.5)
  
  # Churn Mean
  media &lt;- mean(churn)
  abline(h=media, col = "black", lty=2)
  
  # Population scale
  axis(side = 4, col= "red")
  </code></pre>
  
  <p><a href="http://i.stack.imgur.com/IoITb.jpg" rel="nofollow">ylim= c(0,50)</a></p>
  
  <p><a href="http://i.stack.imgur.com/jSqAD.jpg" rel="nofollow">ylim= c(0,5)</a></p>
  
  <p>What I want is to have left(grey) axis at ylim=c(0,5) with the bars bound to that axis. And the right(red) axis at ylim=c(0,50) with the dots bound to that axis...
  The goal is to represent bars and points in the same graph with diferent axis.</p>
  
  <p>Hope I explained myself succesfully.
  Thanks for your assistance!</p>