How to display the x and y values of the cursor location on plot in GUIDE
34 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
Chamath Vithanawasam
il 2 Ott 2018
Commentato: Fangjun Jiang
il 4 Ott 2018
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.
0 Commenti
Risposta accettata
Fangjun Jiang
il 2 Ott 2018
Would this help?
doc datacursormode
4 Commenti
Fangjun Jiang
il 4 Ott 2018
Ha, this might work
plot(rand(1,10),'o-')
[x,y]=ginput(1);
line([x x],ylim);
line(xlim,[y y]);
Più risposte (0)
Vedere anche
Categorie
Scopri di più su Annotations in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!