Path: news.mathworks.com!newsfeed-00.mathworks.com!panix!bloom-beacon.mit.edu!llnews!53ab2750!not-for-mail
Newsgroups: comp.soft-sys.matlab
Subject: Re: extracting data from .fig in 2007a - did the proceedure change?
References: <ffl47g$q5v$1@fred.mathworks.com>
From: Peter Boettcher <boettcher@ll.mit.edu>
Message-ID: <muyabq96col.fsf@G99-Boettcher.llan.ll.mit.edu>
Organization: MIT Lincoln Laboratory
User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/23.0.0 (gnu/linux)
Cancel-Lock: sha1:pojVG+RpvEoYZPVCi7+4i0NUGrI=
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Lines: 42
Date: Tue, 23 Oct 2007 12:03:22 -0400
NNTP-Posting-Host: 155.34.163.114
X-Complaints-To: news@ll.mit.edu
X-Trace: llnews 1193155026 155.34.163.114 (Tue, 23 Oct 2007 11:57:06 EDT)
NNTP-Posting-Date: Tue, 23 Oct 2007 11:57:06 EDT
Xref: news.mathworks.com comp.soft-sys.matlab:434264



"Chris " <cag44@removethispitt.edu> writes:

> 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!

load the file, then start digging through the resulting structure:

>> a = load('filename', '-mat')

a = 

    hgS_070000: [1x1 struct]

>> a.hgS_070000

ans = 

          type: 'figure'
        handle: 9
    properties: [1x1 struct]
      children: [2x1 struct]
       special: []

>> a.hgS_070000.children(1)
and
>> a.hgS_070000.children(2)

etc, etc, etc.

Eventually you'll find what you're looking for.

-Peter