title: How to have both x and y values on the mouse cursor when you hover on the specific given plot?
body: <p>I am having some trouble while printing out unstacked values of x in my plot , so I used numpy arange method to plot with index of x values and name it later with x ticks labels for x axis. But with this method I can't get both x and y values while hovering my mouse cursor on the plot. I have tried using mplcursors module for showing x and y values while hovering.</p>
  
  <pre><code> from matplotlib import pyplot as plt
   import mplcursors
   import numpy as np
   x = ['a','a','a' ,'b','c']
   x1 = np.array(x)
   x2 = np.arange(len(x1))
   y = [1,2,3,4,5]
   plt.plot(x2,y,'ob-')
   plt.xticks(ticks =x2 , labels = x)
   mplcursors.cursor(hover = True)
   plt.show()
  </code></pre>
  
  <p>output image : <a href="https://i.stack.imgur.com/6kN8X.png" rel="nofollow noreferrer">https://i.stack.imgur.com/6kN8X.png</a></p>