Quantcast
Channel: MATLAB Central Newsreader Recent Posts
Viewing all articles
Browse latest Browse all 19628

Re: Using ginput on an axes in a GUI?

$
0
0
I have just uploaded to file-exchange, codes that are supposed to solve the original problem. Here's the link - http://www.mathworks.com/matlabcentral/fileexchange/38997 . Basically it uses BUTTONDOWNFCN, alongwith uipanel. Would appreciate to know if the codes are any help to people still interested in the problem.

"Clive" wrote in message <i6o7j8$qnn$1@fred.mathworks.com>...
> Hi,
> I have a GUI that contains a set of axes. I need to use ginput so a user can click on any point on the axes and obtain data from that point using the inpolygon function.
>
> However, when the ginput function is called in the GUI script, the ginput crosshair isnt confined to the axes but the entire GUI figure. I have tried several methods to set the handles to the axes, for example:
> [xp yp] = ginput(handles.axes, 1)
> but nothing has worked.
>
> Is there a way to confine ginput to the axes on the GUI only?
>
> Thanks,
> Clive

Viewing all articles
Browse latest Browse all 19628

Trending Articles