Thread Subject: Taking data cursor coordinates when clicking in an axes object (GUI)

Subject: Taking data cursor coordinates when clicking in an axes object (GUI)

From: MRR MRR

Date: 1 Sep, 2008 23:11:02

Message: 1 of 2

Hi everybody,

I am trying to do the next:

Having a GUI with an axes object, I would like to obtain
the X and Y coordinates of the cursor JUST when clicking
inside the axes object. Then the (X,Y) coordinates will be
passed as parameters used by other functions, and will
activate a simulation. Also, I would like to have a pointer
in the cursor, for example a small red circle. This circle
would in the last position clicked (it is, the position
with the X,Y parameters taken), every time I click, move
the pointer and "un-click", new parameters are taken.

How could I face it? Any feedback will be very useful.

Thanks. MRR

Subject: Taking data cursor coordinates when clicking in an axes object

From: heiko_marx@hotmail.com

Date: 2 Sep, 2008 06:51:51

Message: 2 of 2

On 2 Sep., 01:11, "MRR MRR" <mario_...@hotmail.com> wrote:
> Hi everybody,
>
> I am trying to do the next:
>
> Having a GUI with an axes object, I would like to obtain
> the X and Y coordinates of the cursor JUST when clicking
> inside the axes object. Then the (X,Y) coordinates will be
> passed as parameters used by other functions, and will
> activate a simulation. Also, I would like to have a pointer
> in the cursor, for example a small red circle. This circle
> would =A0in the last position clicked (it is, the position
> with the X,Y parameters taken), every time I click, move
> the pointer and "un-click", new parameters are taken.
>
> How could I face it? Any feedback will be very useful.
>
> Thanks. MRR

Hi.

See the documentation for ginput and CurrentPoint.

Hope this helps,
Heiko

Tags for this Thread

Everyone's Tags:

Add a New Tag:

Separated by commas
Ex.: root locus, bode

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.

Tag Activity for This Thread
Tag Applied By Date/Time
data cursor MRR 1 Sep, 2008 19:15:05
gui MRR 1 Sep, 2008 19:15:05
coordinates MRR 1 Sep, 2008 19:15:05
plot MRR 1 Sep, 2008 19:15:05
axes MRR 1 Sep, 2008 19:15:05
rssFeed for this Thread

Contact us at files@mathworks.com