Path: news.mathworks.com!not-for-mail
From: <HIDDEN>
Newsgroups: comp.soft-sys.matlab
Subject: Re: How to warp the mouse pointer position
Date: Fri, 2 Jan 2009 16:47:01 +0000 (UTC)
Organization: The MathWorks Inc
Lines: 7
Message-ID: <gjlge5$r86$1@fred.mathworks.com>
References: <gjl5j9$acj$1@fred.mathworks.com>
Reply-To: <HIDDEN>
NNTP-Posting-Host: webapp-02-blr.mathworks.com
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit
X-Trace: fred.mathworks.com 1230914821 27910 172.30.248.37 (2 Jan 2009 16:47:01 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Fri, 2 Jan 2009 16:47:01 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 869871
Xref: news.mathworks.com comp.soft-sys.matlab:509527


"Leandra Vicci" <vicci@cs.unc.edu> wrote in message <gjl5j9$acj$1@fred.mathworks.com>...
> I wish to snap the mouse pointer to the exact coordinates of a known point in the active axes.  X Windows has a function for such purposes, but I can't find an equivalent Matlab graphics function.  Does one exist?  If not, are there primitives I could use to write one?  The axes CurrentPoint, CurrentPoint.x, and CurrentPoint.y properties are read-only, so I can't just set them.
> 

You can use the 'PointerLocation' property of the root (0), in conjunction with figure position and axes position.

jiro