Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

help zooming while using ginput

573 views
Skip to first unread message

Steve

unread,
Mar 16, 2007, 3:18:33 PM3/16/07
to
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?

Steve

unread,
Mar 30, 2007, 4:19:38 PM3/30/07
to
One more try to see if anyone knows...

Steven Lord

unread,
Mar 30, 2007, 4:54:39 PM3/30/07
to

"Steve" <srjm...@gmail.com> wrote in message
news:1175285978.2...@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/solutions/data/1-1CBCQ.html?solution=1-1CBCQ

or you could try this:

http://www.mathworks.com/matlabcentral/fileexchange/loadFile.do?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/solutions/data/1-UHVFH.html?solution=1-UHVFH

[All three of these came from the technical support site, from that one
search.]

--
Steve Lord
sl...@mathworks.com


A Matlab User

unread,
Feb 27, 2014, 8:06:11 AM2/27/14
to
"Steve" <srjm...@gmail.com> wrote in message <1174072713.3...@l77g2000hsb.googlegroups.com>...
Just try a two step way.
First click is to specify the region you want to look at, after that resize with this value the axis and zoom in. with a second ginput you can now select the point you need.

Anurag Pandey

unread,
Jan 26, 2017, 6:13:07 PM1/26/17
to
"Steven Lord" wrote in message <eujtef$7r5$1...@fred.mathworks.com>...
Hi Steve,
I was wondering if you got the answer of this problem. I want to zoom in the graph, the get some points from my graph and again using the pan button i want to scroll the zoomed in graph to search for next point that i would like to select. Problem is when ginput is on i can't use pan button or can't touch the graph for any purpose other than selecting a point.

Thanks alot,
Anurag

Bjorn Gustavsson

unread,
Jan 27, 2017, 9:39:07 AM1/27/17
to
"Anurag Pandey" wrote in message <o6dvpv$29u$1...@newscl01ah.mathworks.com>...
Anyrag, you'll find solutions at the end of the links in Steve's message. In addition I'd suggest you search for ginput2 in the file exchange.

HTh
0 new messages