title: X axis labels begin at the middle and do not match data points
body: <p>I either seem to be running in circles or there is something wrong with my data. I want to plot some data and use <code>?axis</code>to modify the labels on the X axis.</p>
  
  <p>I have two issues however:</p>
  
  <ol>
  <li>The axis labels begin in the center of the x-axis instead of at the beginning</li>
  <li>The axis labels do not match the data points in the plot</li>
  </ol>
  
  <p>I would like to have X axis labels ranging from 10 to 90 by 5.</p>
  
  <p>This is the code that I use and came up with so far:</p>
  
  <pre><code>values &lt;- cbind(1:180,1)
  
  l &lt;-    list(1:10,11:20,21:30,31:40,41:50,51:60,61:70,71:80,81:90,91:100,101:110,111:120,121:130,131:140,141:150,151:160,161:170,171:180)
  # compute mean across the intervals in l
  meanqual &lt;- sapply(l, function(x) mean(values[x,1]))
  meanqual
  plot &lt;- plot(meanqual, type="o", xlab="% Size of Wave", ylab="Values",xaxt='n', lty=1)
  legend('bottomright', c("Values"),pch=21, lty=1, cex=1)
  axis(side=1, at= seq(10,90,5))
  </code></pre>
  
  <p><img src="https://i.stack.imgur.com/s6hY2.png" alt="the plot that I get with x axis labels beginning in the center"></p>