Home > Archive > Matlab > March 2007 > help zooming while using ginput
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
help zooming while using ginput
|
|
|
| For a project I'm working on, I display an image, then need to click
on specific points and use their indices in the code. I'm using
[xvals,yvals]=ginput to get these points.
However, in some images, the region I want to focus on is small, and
using the zoom-in feature would be nice. Unfortunately, zooming seems
to be disabled when using ginput.
I am currently working around this by using a pause command after
displaying the image, then un-pausing (by hitting enter) before using
ginput, but this is kind of awkward, since I have to click on the
Matlab command window tab before hitting enter.
Is there a better way to zoom when using ginput?
| |
|
| One more try to see if anyone knows...
| |
| Steven Lord 2007-03-30, 7:11 pm |
|
"Steve" <srjm72499@gmail.com> wrote in message
news:1175285978.212381.106240@d57g2000hsg.googlegroups.com...
> One more try to see if anyone knows...
You can't zoom by clicking on the figure when GINPUT is operating -- it
would be ambiguous whether MATLAB should zoom in or select the point when
you click. You could create buttons that call the ZOOM function with a
specific zoom factor, or you could try the first approach I found on the
MathWorks technical support site (www.mathworks.com/support) by searching
for "zoom" and "ginput":
http://www.mathworks.com/support/so...olution=1-1CBCQ
or you could try this:
http://www.mathworks.com/matlabcent...o?objectId=9127
Alternately, if you're using GINPUT to get the coordinates just so you can
display them, take a look at the Data Cursor mode:
http://www.mathworks.com/support/so...olution=1-UHVFH
[All three of these came from the technical support site, from that one
search.]
--
Steve Lord
slord@mathworks.com
|
|
|
|
|