<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0">
  <channel>
    <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/157561</link>
    <title>MATLAB Central Newsreader - Plot a line to a specific axis?</title>
    <description>Feed for thread: Plot a line to a specific axis?</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>Thu, 11 Oct 2007 20:11:43 -0400</pubDate>
      <title>Plot a line to a specific axis?</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/157561#396289</link>
      <author>David Doria</author>
      <description>It seems from the help that the line() function will only&lt;br&gt;
plot to the current axis, is this correct?&lt;br&gt;
&lt;br&gt;
for example, i have a (2,1) subplot that i want to alternate&lt;br&gt;
plotting lines on.  &lt;br&gt;
&lt;br&gt;
I did h1=subplot(2,1,1);&lt;br&gt;
h2=subplot(2,1,2);&lt;br&gt;
&lt;br&gt;
but line(h1, [xcoords], [ycoords]) doesn't work!&lt;br&gt;
&lt;br&gt;
Any suggestions?&lt;br&gt;
&lt;br&gt;
Thanks,&lt;br&gt;
&lt;br&gt;
David</description>
    </item>
    <item>
      <pubDate>Thu, 11 Oct 2007 20:15:53 -0400</pubDate>
      <title>Re: Plot a line to a specific axis?</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/157561#396290</link>
      <author>Dan Sternberg</author>
      <description>You may want to try passing in the parent axes as a paremeter to the LINE &lt;br&gt;
function, like this:&lt;br&gt;
&lt;br&gt;
h1 = subplot(2,1,1);&lt;br&gt;
h2 = subplot(2,1,2);&lt;br&gt;
line(1:10,rand(1,10),'Parent',h1);&lt;br&gt;
&lt;br&gt;
-I hope this helps.&lt;br&gt;
&amp;nbsp;Dan&lt;br&gt;
&lt;br&gt;
---&lt;br&gt;
Dan Sternberg&lt;br&gt;
The MathWorks, Inc.&lt;br&gt;
&lt;br&gt;
&quot;David Doria&quot; &amp;lt;daviddoria@gmail.com&amp;gt; wrote in message &lt;br&gt;
news:fem01v$8ge$1@fred.mathworks.com...&lt;br&gt;
&amp;gt; It seems from the help that the line() function will only&lt;br&gt;
&amp;gt; plot to the current axis, is this correct?&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; for example, i have a (2,1) subplot that i want to alternate&lt;br&gt;
&amp;gt; plotting lines on.&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; I did h1=subplot(2,1,1);&lt;br&gt;
&amp;gt; h2=subplot(2,1,2);&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; but line(h1, [xcoords], [ycoords]) doesn't work!&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; Any suggestions?&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; Thanks,&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; David </description>
    </item>
    <item>
      <pubDate>Thu, 11 Oct 2007 21:16:34 -0400</pubDate>
      <title>Re: Plot a line to a specific axis?</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/157561#396302</link>
      <author>David Doria</author>
      <description>Great, thanks!&lt;br&gt;
&lt;br&gt;
&quot;Dan Sternberg&quot; &amp;lt;dsternbeNO@SPAMmathworks.com&amp;gt; wrote in&lt;br&gt;
message &amp;lt;fem09q$d4q$1@fred.mathworks.com&amp;gt;...&lt;br&gt;
&amp;gt; You may want to try passing in the parent axes as a&lt;br&gt;
paremeter to the LINE &lt;br&gt;
&amp;gt; function, like this:&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; h1 = subplot(2,1,1);&lt;br&gt;
&amp;gt; h2 = subplot(2,1,2);&lt;br&gt;
&amp;gt; line(1:10,rand(1,10),'Parent',h1);&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; -I hope this helps.&lt;br&gt;
&amp;gt;  Dan&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; ---&lt;br&gt;
&amp;gt; Dan Sternberg&lt;br&gt;
&amp;gt; The MathWorks, Inc.&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; &quot;David Doria&quot; &amp;lt;daviddoria@gmail.com&amp;gt; wrote in message &lt;br&gt;
&amp;gt; news:fem01v$8ge$1@fred.mathworks.com...&lt;br&gt;
&amp;gt; &amp;gt; It seems from the help that the line() function will only&lt;br&gt;
&amp;gt; &amp;gt; plot to the current axis, is this correct?&lt;br&gt;
&amp;gt; &amp;gt;&lt;br&gt;
&amp;gt; &amp;gt; for example, i have a (2,1) subplot that i want to alternate&lt;br&gt;
&amp;gt; &amp;gt; plotting lines on.&lt;br&gt;
&amp;gt; &amp;gt;&lt;br&gt;
&amp;gt; &amp;gt; I did h1=subplot(2,1,1);&lt;br&gt;
&amp;gt; &amp;gt; h2=subplot(2,1,2);&lt;br&gt;
&amp;gt; &amp;gt;&lt;br&gt;
&amp;gt; &amp;gt; but line(h1, [xcoords], [ycoords]) doesn't work!&lt;br&gt;
&amp;gt; &amp;gt;&lt;br&gt;
&amp;gt; &amp;gt; Any suggestions?&lt;br&gt;
&amp;gt; &amp;gt;&lt;br&gt;
&amp;gt; &amp;gt; Thanks,&lt;br&gt;
&amp;gt; &amp;gt;&lt;br&gt;
&amp;gt; &amp;gt; David &lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; </description>
    </item>
  </channel>
</rss>

