Path: news.mathworks.com!not-for-mail
From: "Dan Haeg" <haegd@msoe.edu>
Newsgroups: comp.soft-sys.matlab
Subject: Re: extracting data from .fig in 2007a - did the proceedure change?
Date: Fri, 26 Oct 2007 01:04:30 +0000 (UTC)
Organization: Milwaukee School of Engineering
Lines: 45
Message-ID: <ffreeu$f0u$1@fred.mathworks.com>
References: <ffl47g$q5v$1@fred.mathworks.com> <fflasp$skn$1@fred.mathworks.com> <fflt8n$cpe$1@fred.mathworks.com>
Reply-To: "Dan Haeg" <haegd@msoe.edu>
NNTP-Posting-Host: webapp-03-blr.mathworks.com
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit
X-Trace: fred.mathworks.com 1193360670 15390 172.30.248.38 (26 Oct 2007 01:04:30 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Fri, 26 Oct 2007 01:04:30 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 475291
Xref: news.mathworks.com comp.soft-sys.matlab:434685



"Chris " <cag44@removethispitt.edu> wrote in message
<fflt8n$cpe$1@fred.mathworks.com>...
> Hi Dan - thanks for the information.
> 
> I tried your exact code on one of my figures and findobj 
> always returns empty.
> 
> "Dan Haeg" <haegd@msoe.edu> wrote in message 
> <fflasp$skn$1@fred.mathworks.com>...
> > "Chris " <cag44@removethispitt.edu> wrote in message
> > <ffl47g$q5v$1@fred.mathworks.com>...
> > > I'd like to extract the original data from several 
> > > scatterplot .fig files.  However, using load
> ('filename','-
> > > mat') does not produce xdata and ydata files and the 
> file 
> > > available here "getfigdata.m" also returns an error 
> saying 
> > > it can't find "lh".  
> > > 
> > > Does anyone know where the data is actually stored in 
> > > a .fig file under 2007a?
> > > 
> > > For instance, www.gaiteri.net/intrinsic_stress.fig
> > > is one I just need to extract this very simple 
> information 
> > > from.  Thanks!
> > 
> > This works:
> > 
> > s=hgload('inlet.fig')
> > h = findobj(s,'Type','line')
> > y=get(h,'ydata');
> > x=get(h,'xdata');
> > 
> > 
> 

If it is not too late this works for your scatter plot:

s=hgload('stress_intrinsic.fig')
h = findobj(s,'Type','hggroup')
y=get(h,'ydata');
x=get(h,'xdata');