title: How to change x-axis from samples/frames to time?
body: <p>I need to change the x-axis on this graph from 'samples' to time:
  <a href="https://i.stack.imgur.com/FxUDm.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/FxUDm.png" alt="enter image description here"></a></p>
  
  <p>I created the graph using this process:</p>
  
  <pre><code>y, _ = librosa.load('sound/data/kea-song.mp3', 48000)
  y /= y.max()
  
  # compute the rmse
  e = librosa.feature.rmse(y=y)[0]
  e -= e.min()#what does this really do, guessing a kind of normalisation?
  e /= e.max()
  plt.plot(e)
  plt.show()
  </code></pre>
  
  <p>If I don't compute the rmse, this converts the x-axis to time:</p>
  
  <pre><code>y, _ = librosa.load('sound/data/kea-song.mp3', 48000)
  plt.plot(np.arange(len(y))/48000, y)
  </code></pre>
  
  <p>But after the rmse function I don't know how to do the conversion. I'm guessing it's something to do with the samples in y* being grouped into frames but I can't for the life of me work out how to convert from these frames(if it is frames) to time!</p>
  
  <p>How do I do this? 
  Thanks in advance(:</p>
  
  <ul>
  <li>heres the plot for plt.plot(y):
  <a href="https://i.stack.imgur.com/3EXge.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/3EXge.png" alt="enter image description here"></a></li>
  </ul>