<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0">
  <channel>
    <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/158201</link>
    <title>MATLAB Central Newsreader - extracting data from .fig in 2007a - did the proceedure change?</title>
    <description>Feed for thread: extracting data from .fig in 2007a - did the proceedure change?</description>
    <language>en-us</language>
    <copyright>&amp;copy;1994-2012 by MathWorks, Inc.</copyright>
    <webmaster>webmaster@mathworks.com</webmaster>
    <generator>MATLAB Central Newsreader</generator>
    <docs>http://blogs.law.harvard.edu/tech/rss</docs>
    <ttl>60</ttl>
    <image>
      <title>MathWorks</title>
      <url>http://www.mathworks.com/images/membrane_icon.gif</url>
    </image>
    <item>
      <pubDate>Tue, 23 Oct 2007 15:33:04 -0400</pubDate>
      <title>extracting data from .fig in 2007a - did the proceedure change?</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/158201#398027</link>
      <author>Chris </author>
      <description>I'd like to extract the original data from several &lt;br&gt;
scatterplot .fig files.  However, using load('filename','-&lt;br&gt;
mat') does not produce xdata and ydata files and the file &lt;br&gt;
available here &quot;getfigdata.m&quot; also returns an error saying &lt;br&gt;
it can't find &quot;lh&quot;.  &lt;br&gt;
&lt;br&gt;
Does anyone know where the data is actually stored in &lt;br&gt;
a .fig file under 2007a?&lt;br&gt;
&lt;br&gt;
For instance, www.gaiteri.net/intrinsic_stress.fig&lt;br&gt;
is one I just need to extract this very simple information &lt;br&gt;
from.  Thanks!</description>
    </item>
    <item>
      <pubDate>Tue, 23 Oct 2007 15:48:28 -0400</pubDate>
      <title>Re: extracting data from .fig in 2007a - did the proceedure change?</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/158201#398030</link>
      <author>Chris </author>
      <description>better link to file&lt;br&gt;
&lt;br&gt;
www.gaiteri.net/stress_intrinsic.zip&lt;br&gt;
&lt;br&gt;
&lt;br&gt;
&lt;br&gt;
&lt;br&gt;
&lt;br&gt;
&lt;br&gt;
&lt;br&gt;
&lt;br&gt;
&quot;Chris &quot; &amp;lt;cag44@removethispitt.edu&amp;gt; wrote in message &lt;br&gt;
&amp;lt;ffl47g$q5v$1@fred.mathworks.com&amp;gt;...&lt;br&gt;
&amp;gt; I'd like to extract the original data from several &lt;br&gt;
&amp;gt; scatterplot .fig files.  However, using load&lt;br&gt;
('filename','-&lt;br&gt;
&amp;gt; mat') does not produce xdata and ydata files and the &lt;br&gt;
file &lt;br&gt;
&amp;gt; available here &quot;getfigdata.m&quot; also returns an error &lt;br&gt;
saying &lt;br&gt;
&amp;gt; it can't find &quot;lh&quot;.  &lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; Does anyone know where the data is actually stored in &lt;br&gt;
&amp;gt; a .fig file under 2007a?&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; For instance, www.gaiteri.net/intrinsic_stress.fig&lt;br&gt;
&amp;gt; is one I just need to extract this very simple &lt;br&gt;
information &lt;br&gt;
&amp;gt; from.  Thanks!</description>
    </item>
    <item>
      <pubDate>Tue, 23 Oct 2007 16:02:10 -0400</pubDate>
      <title>Re: extracting data from .fig in 2007a - did the proceedure change?</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/158201#398037</link>
      <author>PB</author>
      <description>Den Tue, 23 Oct 2007 15:33:04 +0000 skrev Chris :&lt;br&gt;
&lt;br&gt;
&amp;gt; I'd like to extract the original data from several &lt;br&gt;
&amp;gt; scatterplot .fig files.  However, using load('filename','-&lt;br&gt;
&amp;gt; mat') does not produce xdata and ydata files and the file &lt;br&gt;
&amp;gt; available here &quot;getfigdata.m&quot; also returns an error saying &lt;br&gt;
&amp;gt; it can't find &quot;lh&quot;.  &lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; Does anyone know where the data is actually stored in &lt;br&gt;
&amp;gt; a .fig file under 2007a?&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; For instance, www.gaiteri.net/intrinsic_stress.fig&lt;br&gt;
&amp;gt; is one I just need to extract this very simple information &lt;br&gt;
&amp;gt; from.  Thanks!&lt;br&gt;
&lt;br&gt;
I get the following error trying to download your fig:&lt;br&gt;
&lt;br&gt;
The page cannot be found...&lt;br&gt;
&lt;br&gt;
Anyway, this might work:&lt;br&gt;
&lt;br&gt;
%create figure&lt;br&gt;
&lt;br&gt;
fplot(@humps,[0,1]);&lt;br&gt;
saveas(gcf,'test','fig');&lt;br&gt;
close(gcf);	% close fig&lt;br&gt;
&lt;br&gt;
% open the figure again&lt;br&gt;
fighandle=openfig('test.fig');&lt;br&gt;
ax=findall(fighandle,'Type','line');&lt;br&gt;
x=get(ax,'Xdata')&lt;br&gt;
y=get(ax,'YData')&lt;br&gt;
&lt;br&gt;
&lt;br&gt;
HTH&lt;br&gt;
&lt;br&gt;
PB</description>
    </item>
    <item>
      <pubDate>Tue, 23 Oct 2007 16:03:22 -0400</pubDate>
      <title>Re: extracting data from .fig in 2007a - did the proceedure change?</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/158201#398038</link>
      <author>Peter Boettcher</author>
      <description>&quot;Chris &quot; &amp;lt;cag44@removethispitt.edu&amp;gt; writes:&lt;br&gt;
&lt;br&gt;
&amp;gt; I'd like to extract the original data from several &lt;br&gt;
&amp;gt; scatterplot .fig files.  However, using load('filename','-&lt;br&gt;
&amp;gt; mat') does not produce xdata and ydata files and the file &lt;br&gt;
&amp;gt; available here &quot;getfigdata.m&quot; also returns an error saying &lt;br&gt;
&amp;gt; it can't find &quot;lh&quot;.  &lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; Does anyone know where the data is actually stored in &lt;br&gt;
&amp;gt; a .fig file under 2007a?&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; For instance, www.gaiteri.net/intrinsic_stress.fig&lt;br&gt;
&amp;gt; is one I just need to extract this very simple information &lt;br&gt;
&amp;gt; from.  Thanks!&lt;br&gt;
&lt;br&gt;
load the file, then start digging through the resulting structure:&lt;br&gt;
&lt;br&gt;
&amp;gt;&amp;gt; a = load('filename', '-mat')&lt;br&gt;
&lt;br&gt;
a = &lt;br&gt;
&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;hgS_070000: [1x1 struct]&lt;br&gt;
&lt;br&gt;
&amp;gt;&amp;gt; a.hgS_070000&lt;br&gt;
&lt;br&gt;
ans = &lt;br&gt;
&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;type: 'figure'&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;handle: 9&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;properties: [1x1 struct]&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;children: [2x1 struct]&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;special: []&lt;br&gt;
&lt;br&gt;
&amp;gt;&amp;gt; a.hgS_070000.children(1)&lt;br&gt;
and&lt;br&gt;
&amp;gt;&amp;gt; a.hgS_070000.children(2)&lt;br&gt;
&lt;br&gt;
etc, etc, etc.&lt;br&gt;
&lt;br&gt;
Eventually you'll find what you're looking for.&lt;br&gt;
&lt;br&gt;
-Peter</description>
    </item>
    <item>
      <pubDate>Tue, 23 Oct 2007 17:26:50 -0400</pubDate>
      <title>Re: extracting data from .fig in 2007a - did the proceedure change?</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/158201#398055</link>
      <author>Dan Haeg</author>
      <description>&quot;Chris &quot; &amp;lt;cag44@removethispitt.edu&amp;gt; wrote in message&lt;br&gt;
&amp;lt;ffl47g$q5v$1@fred.mathworks.com&amp;gt;...&lt;br&gt;
&amp;gt; I'd like to extract the original data from several &lt;br&gt;
&amp;gt; scatterplot .fig files.  However, using load('filename','-&lt;br&gt;
&amp;gt; mat') does not produce xdata and ydata files and the file &lt;br&gt;
&amp;gt; available here &quot;getfigdata.m&quot; also returns an error saying &lt;br&gt;
&amp;gt; it can't find &quot;lh&quot;.  &lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; Does anyone know where the data is actually stored in &lt;br&gt;
&amp;gt; a .fig file under 2007a?&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; For instance, www.gaiteri.net/intrinsic_stress.fig&lt;br&gt;
&amp;gt; is one I just need to extract this very simple information &lt;br&gt;
&amp;gt; from.  Thanks!&lt;br&gt;
&lt;br&gt;
This works:&lt;br&gt;
&lt;br&gt;
s=hgload('inlet.fig')&lt;br&gt;
h = findobj(s,'Type','line')&lt;br&gt;
y=get(h,'ydata');&lt;br&gt;
x=get(h,'xdata');</description>
    </item>
    <item>
      <pubDate>Tue, 23 Oct 2007 22:35:08 -0400</pubDate>
      <title>Re: extracting data from .fig in 2007a - did the proceedure change?</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/158201#398092</link>
      <author>Chris </author>
      <description>Hi Dan - thanks for the information.&lt;br&gt;
&lt;br&gt;
I tried your exact code on one of my figures and findobj &lt;br&gt;
always returns empty.&lt;br&gt;
&lt;br&gt;
&quot;Dan Haeg&quot; &amp;lt;haegd@msoe.edu&amp;gt; wrote in message &lt;br&gt;
&amp;lt;fflasp$skn$1@fred.mathworks.com&amp;gt;...&lt;br&gt;
&amp;gt; &quot;Chris &quot; &amp;lt;cag44@removethispitt.edu&amp;gt; wrote in message&lt;br&gt;
&amp;gt; &amp;lt;ffl47g$q5v$1@fred.mathworks.com&amp;gt;...&lt;br&gt;
&amp;gt; &amp;gt; I'd like to extract the original data from several &lt;br&gt;
&amp;gt; &amp;gt; scatterplot .fig files.  However, using load&lt;br&gt;
('filename','-&lt;br&gt;
&amp;gt; &amp;gt; mat') does not produce xdata and ydata files and the &lt;br&gt;
file &lt;br&gt;
&amp;gt; &amp;gt; available here &quot;getfigdata.m&quot; also returns an error &lt;br&gt;
saying &lt;br&gt;
&amp;gt; &amp;gt; it can't find &quot;lh&quot;.  &lt;br&gt;
&amp;gt; &amp;gt; &lt;br&gt;
&amp;gt; &amp;gt; Does anyone know where the data is actually stored in &lt;br&gt;
&amp;gt; &amp;gt; a .fig file under 2007a?&lt;br&gt;
&amp;gt; &amp;gt; &lt;br&gt;
&amp;gt; &amp;gt; For instance, www.gaiteri.net/intrinsic_stress.fig&lt;br&gt;
&amp;gt; &amp;gt; is one I just need to extract this very simple &lt;br&gt;
information &lt;br&gt;
&amp;gt; &amp;gt; from.  Thanks!&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; This works:&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; s=hgload('inlet.fig')&lt;br&gt;
&amp;gt; h = findobj(s,'Type','line')&lt;br&gt;
&amp;gt; y=get(h,'ydata');&lt;br&gt;
&amp;gt; x=get(h,'xdata');&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; </description>
    </item>
    <item>
      <pubDate>Tue, 23 Oct 2007 22:40:23 -0400</pubDate>
      <title>Re: extracting data from .fig in 2007a - did the proceedure change?</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/158201#398093</link>
      <author>Chris </author>
      <description>Hi Dan - thanks for the information.&lt;br&gt;
&lt;br&gt;
I tried your exact code on one of my figures and findobj &lt;br&gt;
always returns empty.&lt;br&gt;
&lt;br&gt;
&quot;Dan Haeg&quot; &amp;lt;haegd@msoe.edu&amp;gt; wrote in message &lt;br&gt;
&amp;lt;fflasp$skn$1@fred.mathworks.com&amp;gt;...&lt;br&gt;
&amp;gt; &quot;Chris &quot; &amp;lt;cag44@removethispitt.edu&amp;gt; wrote in message&lt;br&gt;
&amp;gt; &amp;lt;ffl47g$q5v$1@fred.mathworks.com&amp;gt;...&lt;br&gt;
&amp;gt; &amp;gt; I'd like to extract the original data from several &lt;br&gt;
&amp;gt; &amp;gt; scatterplot .fig files.  However, using load&lt;br&gt;
('filename','-&lt;br&gt;
&amp;gt; &amp;gt; mat') does not produce xdata and ydata files and the &lt;br&gt;
file &lt;br&gt;
&amp;gt; &amp;gt; available here &quot;getfigdata.m&quot; also returns an error &lt;br&gt;
saying &lt;br&gt;
&amp;gt; &amp;gt; it can't find &quot;lh&quot;.  &lt;br&gt;
&amp;gt; &amp;gt; &lt;br&gt;
&amp;gt; &amp;gt; Does anyone know where the data is actually stored in &lt;br&gt;
&amp;gt; &amp;gt; a .fig file under 2007a?&lt;br&gt;
&amp;gt; &amp;gt; &lt;br&gt;
&amp;gt; &amp;gt; For instance, www.gaiteri.net/intrinsic_stress.fig&lt;br&gt;
&amp;gt; &amp;gt; is one I just need to extract this very simple &lt;br&gt;
information &lt;br&gt;
&amp;gt; &amp;gt; from.  Thanks!&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; This works:&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; s=hgload('inlet.fig')&lt;br&gt;
&amp;gt; h = findobj(s,'Type','line')&lt;br&gt;
&amp;gt; y=get(h,'ydata');&lt;br&gt;
&amp;gt; x=get(h,'xdata');&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; </description>
    </item>
    <item>
      <pubDate>Fri, 26 Oct 2007 01:04:30 -0400</pubDate>
      <title>Re: extracting data from .fig in 2007a - did the proceedure change?</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/158201#398458</link>
      <author>Dan Haeg</author>
      <description>&quot;Chris &quot; &amp;lt;cag44@removethispitt.edu&amp;gt; wrote in message&lt;br&gt;
&amp;lt;fflt8n$cpe$1@fred.mathworks.com&amp;gt;...&lt;br&gt;
&amp;gt; Hi Dan - thanks for the information.&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; I tried your exact code on one of my figures and findobj &lt;br&gt;
&amp;gt; always returns empty.&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; &quot;Dan Haeg&quot; &amp;lt;haegd@msoe.edu&amp;gt; wrote in message &lt;br&gt;
&amp;gt; &amp;lt;fflasp$skn$1@fred.mathworks.com&amp;gt;...&lt;br&gt;
&amp;gt; &amp;gt; &quot;Chris &quot; &amp;lt;cag44@removethispitt.edu&amp;gt; wrote in message&lt;br&gt;
&amp;gt; &amp;gt; &amp;lt;ffl47g$q5v$1@fred.mathworks.com&amp;gt;...&lt;br&gt;
&amp;gt; &amp;gt; &amp;gt; I'd like to extract the original data from several &lt;br&gt;
&amp;gt; &amp;gt; &amp;gt; scatterplot .fig files.  However, using load&lt;br&gt;
&amp;gt; ('filename','-&lt;br&gt;
&amp;gt; &amp;gt; &amp;gt; mat') does not produce xdata and ydata files and the &lt;br&gt;
&amp;gt; file &lt;br&gt;
&amp;gt; &amp;gt; &amp;gt; available here &quot;getfigdata.m&quot; also returns an error &lt;br&gt;
&amp;gt; saying &lt;br&gt;
&amp;gt; &amp;gt; &amp;gt; it can't find &quot;lh&quot;.  &lt;br&gt;
&amp;gt; &amp;gt; &amp;gt; &lt;br&gt;
&amp;gt; &amp;gt; &amp;gt; Does anyone know where the data is actually stored in &lt;br&gt;
&amp;gt; &amp;gt; &amp;gt; a .fig file under 2007a?&lt;br&gt;
&amp;gt; &amp;gt; &amp;gt; &lt;br&gt;
&amp;gt; &amp;gt; &amp;gt; For instance, www.gaiteri.net/intrinsic_stress.fig&lt;br&gt;
&amp;gt; &amp;gt; &amp;gt; is one I just need to extract this very simple &lt;br&gt;
&amp;gt; information &lt;br&gt;
&amp;gt; &amp;gt; &amp;gt; from.  Thanks!&lt;br&gt;
&amp;gt; &amp;gt; &lt;br&gt;
&amp;gt; &amp;gt; This works:&lt;br&gt;
&amp;gt; &amp;gt; &lt;br&gt;
&amp;gt; &amp;gt; s=hgload('inlet.fig')&lt;br&gt;
&amp;gt; &amp;gt; h = findobj(s,'Type','line')&lt;br&gt;
&amp;gt; &amp;gt; y=get(h,'ydata');&lt;br&gt;
&amp;gt; &amp;gt; x=get(h,'xdata');&lt;br&gt;
&amp;gt; &amp;gt; &lt;br&gt;
&amp;gt; &amp;gt; &lt;br&gt;
&amp;gt; &lt;br&gt;
&lt;br&gt;
If it is not too late this works for your scatter plot:&lt;br&gt;
&lt;br&gt;
s=hgload('stress_intrinsic.fig')&lt;br&gt;
h = findobj(s,'Type','hggroup')&lt;br&gt;
y=get(h,'ydata');&lt;br&gt;
x=get(h,'xdata');</description>
    </item>
    <item>
      <pubDate>Fri, 26 Feb 2010 17:23:04 -0500</pubDate>
      <title>Re: extracting data from .fig in 2007a - did the proceedure change?</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/158201#721606</link>
      <author>pipa </author>
      <description>Thanks!&lt;br&gt;
It was really helpful!</description>
    </item>
  </channel>
</rss>

