Path: news.mathworks.com!not-for-mail
From: "Mahdieh " <mahdieh.emrani@capitalhealth.ca>
Newsgroups: comp.soft-sys.matlab
Subject: Re: urgent: selecting 3D points on figure
Date: Wed, 15 Oct 2008 16:17:01 +0000 (UTC)
Organization: Glenrose Research Building
Lines: 31
Message-ID: <gd551t$b5e$1@fred.mathworks.com>
References: <gd34um$e9s$1@fred.mathworks.com>
Reply-To: "Mahdieh " <mahdieh.emrani@capitalhealth.ca>
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 1224087421 11438 172.30.248.37 (15 Oct 2008 16:17:01 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Wed, 15 Oct 2008 16:17:01 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 1449772
Xref: news.mathworks.com comp.soft-sys.matlab:495388


Hey, 
I found it myself...
for selecting multiple cursor on my data, I keep down Alt ...
 and to access their coordinates I wrote the following:

>>dcm_obj = datacursormode(fig);
>>f = getCursorInfo(dcm_obj)
f =
1x3 struct array with fields:
    Target
    Position
    DataIndex
>> a = struct2cell(f);

Now the points are simply in a{2},a{5},a{8} ...
if three points are selected ...

-Mahdieh 


"Mahdieh " <mahdieh.emrani@capitalhealth.ca> wrote in message <gd34um$e9s$1@fred.mathworks.com>...
> Hi everybody,
> 
> This problem has wasted my time for sometime now...
> Any help would be appreciated ...
> I plot a 3D dataset using plot3, and I want to be able to click on 7 different points on the figure...and access the xyz coordinates of those points in my workspace ...
> I have tried, getpts, ginput, and played a bit with datacursor ...
> The first two are for xy data and I can not get the z coordinate, and with the latter, I can not select several points ...
> 
> Any help would be appreciated ...
> -Mahdieh