title: Showing both the value and index in the x-ticks in a plot
body: <p>I want to plot something using <code>plot(x,y)</code> and be able to see on the plot the index of the value in <code>x</code></p>
  
  <p>For example.</p>
  
  <pre><code>x = [10,30,100,120]
  y = [16,17,19,3]
  plot(x,y)
  </code></pre>
  
  <p>will show </p>
  
  <p><a href="https://i.stack.imgur.com/C2IKz.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/C2IKz.png" alt="enter image description here"></a></p>
  
  <p>looking at the plot it is hard to know at every point what was the original index. For example I want to be able to know when looking at the point (100,19) that it is index 2, since <code>x[2]=100</code> and <code>y[2]=19</code>.
  How do I do that in matplotlib.
  I looked at <code>twiny()</code> function but that seems to just add another axes disregarding the distance between points in x.</p>