title: How to set axis range R
body: <p>I'm having trouble setting my axis range in r. My data only has values from 2 to 9 on the x axis but I want it to go from 1 to 10. Any quick tips please?</p>
  
  <pre><code>head(SS)
    Phase Bed Site ACC X.M.SA
  1     1   1    1  NG     NO
  2     1   1    2  NG     NO
  3     1   1    3  SG     NO
  4     1   1    4  SG     NO
  5     1   1    5  SG     NO
  6     1   2    1  SG     NO
  
  XMSA&lt;-factor(SS$X.M.SA)
  ACC&lt;-factor(SS$ACC,ordered = TRUE,levels=c("NG","SG","LG","MG","HG"))
  
  boxplot(ACC[XMSA=="MSSA"]~SS$Bed[XMSA=="MSSA"],
  xlab="Bed",ylab="Growth",
  las=1, yaxt="n",ylim=c(1,5),xlim=c(1,10))
  axis(2, at=c(1,2,3,4,5),labels=c("NG","SG","LG","MG","HG"),las=1)
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/QNvgx.png" rel="noreferrer"><img src="https://i.stack.imgur.com/QNvgx.png" alt="enter image description here"></a></p>