title: Making barplot axis more readable: how to place ticks at some positions on the X axis so they correspond to specific bars for a large vector
body: <p>Say i have a fairly long vector which i want to present as a barplot:</p>
  <pre><code>myvec&lt;-runif(2000,0,1)
  barplot(myvec, col=&quot;grey&quot;, border=NA, names.arg  = seq(1:2000))
  </code></pre>
  <p><a href="https://i.stack.imgur.com/OKWzs.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/OKWzs.png" alt="enter image description here" /></a></p>
  <p>i would like x axis to go pretty:
  to have, say 4-5 labels to be shown on the axis, but with the ticks that determine to which specific bar it corresponds.
  worst to worst i can live with the random labels that are being picked automatically, but i want to see which bar they correspond to.</p>
  <p>thanks</p>