When you point your cursor on an image opened in MATLAB, you can see X, Y location and value of that pixel. I wanted to see if similar functionality exists in python.
I came across https://github.com/joferkington/mpldatacursor and figured that I can get the functionality I am looking for using mlpdatacursor. However, I'm not quiet sure how to use this module in Jupyter Notebooks.
I did: pip install mlpdatcursor and it worked. Then I ran their code to test:
import matplotlib.pyplot as plt
import numpy as np
from mpldatacursor import datacursor
data = np.outer(range(10), range(1, 5))
fig, ax = plt.subplots()
lines = ax.plot(data)
ax.set_title('Click somewhere on a line')
datacursor(lines)
plt.show()
The code runs without any error, however, I don't see any displays of the x, y coordinates when I click on the lines! Any idea what do I need to do to have this run successfully in Jupyter notebooks?