title: Changing X-Axis Values in r
body: <p>I would like to change the x-axis of a plot in R. Here is my example:</p>
  
  <pre><code>plot(cbind(result, result),xlim=c(max(result),min(result)),
       ylim=c(min(result),max(result)), xaxt="n")
  axis(1, at=result)
  
  result
  ## [1] 0.6256767 0.6833695 0.7671350 0.5205373 0.4932262 0.5852338 0.5088692 0.3379572
  ## [9] 0.3420370 0.3029084 0.4677624 0.4822537 0.3047485 0.3852572 0.3186014 0.2009436
  ## [17] 0.1882227 0.2090007 0.2654110 0.3334744
  </code></pre>
  
  <p><img src="https://i.stack.imgur.com/BpLV1.jpg" alt="enter image description here"></p>
  
  <p>I want to have new values on the x-axis from 1 to 20. I tried use <code>axis(1, at=seq(1, 20))</code> but it did not work.  What should I do to?</p>