MATLAB: How to display the x and y values of the cursor location on plot in GUIDE

cursorguideMATLABplot

Suppose I plot a graph on an axis in MATLAB GUIDE. How do I get two static text boxes to display the x and y values of the point my cursor is hovering over? I know this can be done to show the pixel coordinates in the GUI, but when it comes to a plot I am unsure.

Best Answer

Would this help?
doc datacursormode