Display Cursor Location

Display cursor coordinates within a plot axes window
3,1K Descargas
Actualizado 30 jul 2008

Ver licencia

Display the current cursor coordinates within the bounds of a plot axes.

Assigned as a WindowButtonMotionFcn callback function. Only updates when mouse is moved over plot contents.

To use (See screenshot):

t = linspace(-5,5);
y = sinc(t);
f = figure;
plot(t, y, 'r');

set(f, 'WindowButtonMotionFcn', @(obj, event)cursorLocation(obj, event, 'BottomLeft', ' X: %.3f\n Y: %.3f', 'r'))

For more information:
http://iheartmatlab.blogspot.com/2008/07/display-cursor-coordinates.html

Citar como

Rodney Thomson (2026). Display Cursor Location (https://es.mathworks.com/matlabcentral/fileexchange/20892-display-cursor-location), MATLAB Central File Exchange. Recuperado .

Compatibilidad con la versión de MATLAB
Se creó con R14SP3
Compatible con cualquier versión
Compatibilidad con las plataformas
Windows macOS Linux
Categorías
Más información sobre Data Exploration en Help Center y MATLAB Answers.
Agradecimientos

Inspiración para: stackobj, dtmcursor

Versión Publicado Notas de la versión
1.0.0.0

Link to blog entry