Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

Thread Subject:
How to get mouse position on an imagesc (which is in a GUi axes) (without using CurrentPoint -> problem when zooming)

Subject: How to get mouse position on an imagesc (which is in a GUi axes) (without using CurrentPoint -> problem when zooming)

From: Camille Couzi

Date: 13 Aug, 2010 14:11:04

Message: 1 of 2

Hi matlabers,

I am having a little new challenge:
I am working on a GUI that displays imagesc on axes (it is a matrix, with a colormap that displays thez values for each x-y of my matrix).
I have created a little figure and I want to display on this figure values of x,y,z and other handle information attached to a certain point, when pointing on the imagesc with the pointer. - WTIHOUT CLIKING

I have looked at current point, trying to define the position of the pointer related to the position of the axe where the imagesc is displayed, but I would have a problem when zoomin in and out (because then I would not know in what x-y position I am in the matrix...

Do you have any idea of what I can do to solve this problem? I have searched on the file exchange but haven't found anything... Any idea would be great.
Thanks in advance

Camille.

Subject: How to get mouse position on an imagesc (which is in a GUi axes) (without using CurrentPoint -> problem when zooming)

From: Camille Couzi

Date: 13 Aug, 2010 15:18:05

Message: 2 of 2

Hi again. Have found many functions on file exchange and library of matlab, and what I have found better is impixelinfo, but my question now is: does it work on imagesc or only on real images (jpg?)

Thanks for your ideas and help...

Tags for this Thread

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

Contact us