Data Cursor on Mouse Move

Display and update the pixel value from image in the figure title bar on mouse movement.

Vous suivez désormais cette soumission

Display and update the pixel value from image in the figure title bar on mouse movement.

Usage:
z=rand(10,10);
h = image(z)
set(gcf,'WindowButtonMotionFcn', {@getPixelOnMouseMove,h});

Now move the mouse over the image and see the pixel value in the figure title bar.

Bugs and comments are welcome.

Citation pour cette source

Durga Lal Shrestha (2026). Data Cursor on Mouse Move (https://fr.mathworks.com/matlabcentral/fileexchange/32900-data-cursor-on-mouse-move), MATLAB Central File Exchange. Extrait(e) le .

Catégories

En savoir plus sur Display Image dans Help Center et MATLAB Answers

Informations générales

Compatibilité avec les versions de MATLAB

  • Compatible avec toutes les versions

Plateformes compatibles

  • Windows
  • macOS
  • Linux
Version Publié le Notes de version Action
1.2.0.0

- Update with overobj3 subfunction which returns handle of object that the pointer is over.
- Third argument (imagePlot) is optional, in this case overobj3 subfunction returns the handle of image that the pointer is over.

1.1.0.0

Bug fixed on subfunction "closest" and some comments are added.

1.0.0.0