File Exchange

image thumbnail

AddImageXYTracker.m

version 1.0.0.0 (1.58 KB) by Peter Caday
Click an image to see pixel coordinates and values.

0 Downloads

Updated 16 Jun 2014

View License

Syntax:

AddImageXYTracker(h)

Adds a callback to the image handle h so that when the image is clicked, the plot title displays the coordinates and value of the clicked pixel.
Unlike MATLAB's data cursor, the coordinates are always matrix indices.

If h is not specified, AddImageXYTracker looks for the first image it finds in the current axes.

Example:

h = imagesc(eye(5));
AddImageXYTracker(h);
% Now you can click the image to see pixel locations and values.

Cite As

Peter Caday (2020). AddImageXYTracker.m (https://www.mathworks.com/matlabcentral/fileexchange/46974-addimagexytracker-m), MATLAB Central File Exchange. Retrieved .

Comments and Ratings (0)

MATLAB Release Compatibility
Created with R2012b
Compatible with any release
Platform Compatibility
Windows macOS Linux
Tags Add Tags