Path: news.mathworks.com!not-for-mail
From: "Phil Goddard" <philgoddardNOSPAM@telus.net>
Newsgroups: comp.soft-sys.matlab
Subject: Re: getting the data out of Matlab fig
Date: Tue, 21 Apr 2009 00:44:01 +0000 (UTC)
Organization: Goddard Consulting
Lines: 7
Message-ID: <gsj4sh$lim$1@fred.mathworks.com>
References: <gsiuva$sv8$1@fred.mathworks.com> <gsj462$af2$1@fred.mathworks.com>
Reply-To: "Phil Goddard" <philgoddardNOSPAM@telus.net>
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 1240274641 22102 172.30.248.37 (21 Apr 2009 00:44:01 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Tue, 21 Apr 2009 00:44:01 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 26433
Xref: news.mathworks.com comp.soft-sys.matlab:534222



A .fig file is simply a .mat file with a different extension, so if you don't want to actually render the image you can do
>> s = load('filename.fig','-mat');
to load the data as a structure into the workspace.
The structure follows a similar heirarchy to that of handle graphics objects so you'll need to dig into it (mainly the 'children' field of the structure, and probably down several levels) to find the XData and YData fields.

Phil.