View License

Download apps, toolboxes, and other File Exchange content using Add-On Explorer in MATLAB.

» Watch video

Highlights from
GINPUT funtion to be used in GUIs

3.0 | 4 ratings Rate this file 28 Downloads (last 30 days) File Size: 12.5 KB File ID: #39799 Version: 1.0
image thumbnail

GINPUT funtion to be used in GUIs



This function works similar to GINPUT but only presents the crosshair in axes specified by the user.

| Watch this File

File Information

This function works similar to GINPUT. However it allows the user to specify which axes or multiple axes are active, being the crosshair only shown within these axes. It also returns which axes did the user click on.

Required Products MATLAB
MATLAB release MATLAB 7.13 (R2011b)
Tags for This File   Please login to tag files.
Please login to add a comment or rating.
Comments and Ratings (7)
21 Jul 2016 DGM

It looks like there's a lot of work in what should be a very useful tool.

I never could get it to work consistently across Matlab versions without modification. I had problems in anything but simple single-axes figures. I ended up having to specify the figure as the parent of the specified axes, otherwise it would either spawn a new figure or dump error messages.

In the end, the fact that this relies on waitforbuttonpress() means it makes combined mouse/kb input problematic in my application. The code was tremendously helpful in developing my own approach to event handling though.

Comment only
23 Mar 2016 abdulkadir tastan

how can I wacth this video ?

Comment only
07 Jul 2015 Dan

Dan (view profile)

03 Jul 2015 Dan

Dan (view profile)

This is a great tool, thanks for submission! The only problem that i had is, that i have a more complex GUI layout, where the axes in question are not the direct child of the figure, hence the script assumes the axes in the wrong place. I added this functionality for me so that it also works in such cases.I can share the additional lines of code if you like

Comment only
19 Apr 2015 Jordan Crosley

The video doesn't work and I can't get ginputax to work either.

19 Apr 2015 Jordan Crosley

And I can't get ginputax to work either.

29 Oct 2014 Geoff Hayes

This is a neat submission (and works well) but just note that the examples (in the file header) are opposite to how they should be invoked. The axes handle(s) should be the first input to the function, and the number of points should be the second input. If there is more than one handle, then this should be passed as an vector rather than as a cell array. Note that the fourth output, the axes that each point belongs to, only gets set with the last point's axes (so if four points are selected, then we only see the axes for the fourth point).

Contact us