From: henry wang on
Hi,

Currently, when I use a data cursor inside a figure, I can display the x,y position.

What I want, however, is to, base on x,y, position, read from IM=imread(location(x,y)); and figure; imshow(IM).

Is there a way to do this? For now, when I click on 'Edit Text Update Function' in cursor mode, I can only modify the .m file to display whatever string I want, but not new figures.

Thanks,
Henry
From: Walter Roberson on
henry wang wrote:

> Currently, when I use a data cursor inside a figure, I can display the
> x,y position.
>
> What I want, however, is to, base on x,y, position, read from
> IM=imread(location(x,y)); and figure; imshow(IM).
>
> Is there a way to do this? For now, when I click on 'Edit Text Update
> Function' in cursor mode, I can only modify the .m file to display
> whatever string I want, but not new figures.

I guess you could probably do it, but I am not clear as to what you are trying
to accomplish. Is location a function that takes numeric (fractional) x and y
values and outputs a character string that is the name of the file to open?