Path: news.mathworks.com!not-for-mail
From: <HIDDEN>
Newsgroups: comp.soft-sys.matlab
Subject: Re: Extracting Data from Plots
Date: Fri, 24 Aug 2007 08:06:40 +0000 (UTC)
Organization: TACT Computer Systems Ltd
Lines: 38
Message-ID: <fam3ig$il9$1@fred.mathworks.com>
References: <fafcsg$3l1$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 1187942800 19113 172.30.248.37 (24 Aug 2007 08:06:40 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Fri, 24 Aug 2007 08:06:40 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 642467
Xref: news.mathworks.com comp.soft-sys.matlab:425363



You might try looking at PlotData on the File Exchange, and
the m-code within it:
http://www.mathworks.com/matlabcentral/fileexchange/loadFile.do?objectId=15372

Yair Altman
http://ymasoftware.com


"First Last" <nospam@nospamplease.com> wrote in message
<fafcsg$3l1$1@fred.mathworks.com>...
> I have a set of plots saved in MATLAB .fig format. Each one
> has several subplots. I was wondering if there was a
> functional form (i.e. non-GUI) of extracting data such as
> the first data point in the graph. I noticed that in the
> GUI, this information is available, so it's gotta be there
> somewhere! 
> 
> I am familiar with the following. For a given graph:
> 
> h = plot(1:10);
> yData = get(h,'YData');
> 
> since YData becomes a property of h. For whatever reason, in
> my subplots, YData is not a property. So when I have
> 
> h = subplot(3,3,1); 
> yData = get(h,'YData');
> 
> an error obviously occurs. I looked through the properties
> of gca, and there didn't seem to be anything akin to YData
> for subplots.
> 
> Any ideas on how to extract a data point's info from the
> subplot? Oh, and I should mention that it could be a case of
> multiple pieces of data per subplot. But being able to
> extract any point should be possible, I would think.
> 
> Thanks in adv.