<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0">
  <channel>
    <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/154896</link>
    <title>MATLAB Central Newsreader - Extracting Data from Plots</title>
    <description>Feed for thread: Extracting Data from Plots</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, 21 Aug 2007 19:02:40 -0400</pubDate>
      <title>Extracting Data from Plots</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/154896#388630</link>
      <author>First Last</author>
      <description>I have a set of plots saved in MATLAB .fig format. Each one&lt;br&gt;
has several subplots. I was wondering if there was a&lt;br&gt;
functional form (i.e. non-GUI) of extracting data such as&lt;br&gt;
the first data point in the graph. I noticed that in the&lt;br&gt;
GUI, this information is available, so it's gotta be there&lt;br&gt;
somewhere! &lt;br&gt;
&lt;br&gt;
I am familiar with the following. For a given graph:&lt;br&gt;
&lt;br&gt;
h = plot(1:10);&lt;br&gt;
yData = get(h,'YData');&lt;br&gt;
&lt;br&gt;
since YData becomes a property of h. For whatever reason, in&lt;br&gt;
my subplots, YData is not a property. So when I have&lt;br&gt;
&lt;br&gt;
h = subplot(3,3,1); &lt;br&gt;
yData = get(h,'YData');&lt;br&gt;
&lt;br&gt;
an error obviously occurs. I looked through the properties&lt;br&gt;
of gca, and there didn't seem to be anything akin to YData&lt;br&gt;
for subplots.&lt;br&gt;
&lt;br&gt;
Any ideas on how to extract a data point's info from the&lt;br&gt;
subplot? Oh, and I should mention that it could be a case of&lt;br&gt;
multiple pieces of data per subplot. But being able to&lt;br&gt;
extract any point should be possible, I would think.&lt;br&gt;
&lt;br&gt;
Thanks in adv.</description>
    </item>
    <item>
      <pubDate>Tue, 21 Aug 2007 19:55:51 -0400</pubDate>
      <title>Re: Extracting Data from Plots</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/154896#388641</link>
      <author>First Last</author>
      <description>Solution:&lt;br&gt;
&lt;br&gt;
get(get(gca,'Children'),'YData');&lt;br&gt;
&lt;br&gt;
Multi-line plots will have multiple arrays in which the data&lt;br&gt;
is stored. Thanks to a colleague of mine for pointing this&lt;br&gt;
out to me!</description>
    </item>
    <item>
      <pubDate>Fri, 24 Aug 2007 08:06:40 -0400</pubDate>
      <title>Re: Extracting Data from Plots</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/154896#389161</link>
      <author>Yair Altman</author>
      <description>You might try looking at PlotData on the File Exchange, and&lt;br&gt;
the m-code within it:&lt;br&gt;
&lt;a href=&quot;http://www.mathworks.com/matlabcentral/fileexchange/loadFile.do?objectId=15372&quot;&gt;http://www.mathworks.com/matlabcentral/fileexchange/loadFile.do?objectId=15372&lt;/a&gt;&lt;br&gt;
&lt;br&gt;
Yair Altman&lt;br&gt;
&lt;a href=&quot;http://ymasoftware.com&quot;&gt;http://ymasoftware.com&lt;/a&gt;&lt;br&gt;
&lt;br&gt;
&lt;br&gt;
&quot;First Last&quot; &amp;lt;nospam@nospamplease.com&amp;gt; wrote in message&lt;br&gt;
&amp;lt;fafcsg$3l1$1@fred.mathworks.com&amp;gt;...&lt;br&gt;
&amp;gt; I have a set of plots saved in MATLAB .fig format. Each one&lt;br&gt;
&amp;gt; has several subplots. I was wondering if there was a&lt;br&gt;
&amp;gt; functional form (i.e. non-GUI) of extracting data such as&lt;br&gt;
&amp;gt; the first data point in the graph. I noticed that in the&lt;br&gt;
&amp;gt; GUI, this information is available, so it's gotta be there&lt;br&gt;
&amp;gt; somewhere! &lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; I am familiar with the following. For a given graph:&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; h = plot(1:10);&lt;br&gt;
&amp;gt; yData = get(h,'YData');&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; since YData becomes a property of h. For whatever reason, in&lt;br&gt;
&amp;gt; my subplots, YData is not a property. So when I have&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; h = subplot(3,3,1); &lt;br&gt;
&amp;gt; yData = get(h,'YData');&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; an error obviously occurs. I looked through the properties&lt;br&gt;
&amp;gt; of gca, and there didn't seem to be anything akin to YData&lt;br&gt;
&amp;gt; for subplots.&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; Any ideas on how to extract a data point's info from the&lt;br&gt;
&amp;gt; subplot? Oh, and I should mention that it could be a case of&lt;br&gt;
&amp;gt; multiple pieces of data per subplot. But being able to&lt;br&gt;
&amp;gt; extract any point should be possible, I would think.&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; Thanks in adv.</description>
    </item>
  </channel>
</rss>

