<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Hold Everything!</title>
	<atom:link href="http://blogs.mathworks.com/loren/2009/06/03/hold-everything/feed/" rel="self" type="application/rss+xml" />
	<link>http://blogs.mathworks.com/loren/2009/06/03/hold-everything/</link>
	<description>Loren Shure works on design of the MATLAB language at MathWorks. She writes here about once a week on MATLAB programming and related topics.</description>
	<lastBuildDate>Thu, 09 Feb 2012 04:19:21 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
	<item>
		<title>By: Ana</title>
		<link>http://blogs.mathworks.com/loren/2009/06/03/hold-everything/#comment-32332</link>
		<dc:creator>Ana</dc:creator>
		<pubDate>Mon, 20 Jun 2011 12:05:18 +0000</pubDate>
		<guid isPermaLink="false">http://blogs.mathworks.com/loren/2009/06/03/hold-everything/#comment-32332</guid>
		<description>Ok, I have found the answer. I have to indicate hold which figure has to hold:

&lt;pre&gt;
 hold(handles.axes,&#039;all&#039;)
&lt;/pre&gt;</description>
		<content:encoded><![CDATA[<p>Ok, I have found the answer. I have to indicate hold which figure has to hold:</p>
<pre>
 hold(handles.axes,'all')
</pre>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ana</title>
		<link>http://blogs.mathworks.com/loren/2009/06/03/hold-everything/#comment-32331</link>
		<dc:creator>Ana</dc:creator>
		<pubDate>Mon, 20 Jun 2011 11:44:48 +0000</pubDate>
		<guid isPermaLink="false">http://blogs.mathworks.com/loren/2009/06/03/hold-everything/#comment-32331</guid>
		<description>Hi,
I use hold all inside a for loop to represent several data in a GUI axes:
&lt;pre&gt;
for i=1:length(filedata)
    % more data processing code here
    plot(handles.axes,processed_datax,processed_datay),  
    hold all
end
&lt;/pre&gt;

It works fine, as always I have used it. However, the data processing takes some time to compute so I decided to add a waitbar:
&lt;pre&gt;
h = waitbar(0, &#039;computing...&#039;)
for i=1:length(filedata)
    waitbar(i/length(filedata),h)
    % more data processing code here
    plot(handles.axes,processed_datax,processed_datay),  
    hold all
end
close (h)
&lt;/pre&gt;

In this case, the hold stops working. Apparently, the fact that waitbar interrupts the for clears the hold in some way... 
How do you work around this?</description>
		<content:encoded><![CDATA[<p>Hi,<br />
I use hold all inside a for loop to represent several data in a GUI axes:</p>
<pre>
for i=1:length(filedata)
    % more data processing code here
    plot(handles.axes,processed_datax,processed_datay),
    hold all
end
</pre>
<p>It works fine, as always I have used it. However, the data processing takes some time to compute so I decided to add a waitbar:</p>
<pre>
h = waitbar(0, 'computing...')
for i=1:length(filedata)
    waitbar(i/length(filedata),h)
    % more data processing code here
    plot(handles.axes,processed_datax,processed_datay),
    hold all
end
close (h)
</pre>
<p>In this case, the hold stops working. Apparently, the fact that waitbar interrupts the for clears the hold in some way&#8230;<br />
How do you work around this?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Loren</title>
		<link>http://blogs.mathworks.com/loren/2009/06/03/hold-everything/#comment-32065</link>
		<dc:creator>Loren</dc:creator>
		<pubDate>Thu, 24 Feb 2011 16:50:02 +0000</pubDate>
		<guid isPermaLink="false">http://blogs.mathworks.com/loren/2009/06/03/hold-everything/#comment-32065</guid>
		<description>Dave-

Still makes no sense to me.  Indexing shouldn&#039;t help here.  Did you try omitting the color and use &quot;hold all&quot; instead of &quot;hold on&quot;?  Then add the legend.

--Loren</description>
		<content:encoded><![CDATA[<p>Dave-</p>
<p>Still makes no sense to me.  Indexing shouldn&#8217;t help here.  Did you try omitting the color and use &#8220;hold all&#8221; instead of &#8220;hold on&#8221;?  Then add the legend.</p>
<p>&#8211;Loren</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Loren</title>
		<link>http://blogs.mathworks.com/loren/2009/06/03/hold-everything/#comment-32064</link>
		<dc:creator>Loren</dc:creator>
		<pubDate>Thu, 24 Feb 2011 16:47:31 +0000</pubDate>
		<guid isPermaLink="false">http://blogs.mathworks.com/loren/2009/06/03/hold-everything/#comment-32064</guid>
		<description>Dave-

This makes not sense to me.  I think you should contact technical support (link on right of blog page) with sample data and script plus error.  Also information about your computer.  I can easily plot 1749 points without even thinking about it.  Indexing in shouldn&#039;t make it more possible.

--Loren</description>
		<content:encoded><![CDATA[<p>Dave-</p>
<p>This makes not sense to me.  I think you should contact technical support (link on right of blog page) with sample data and script plus error.  Also information about your computer.  I can easily plot 1749 points without even thinking about it.  Indexing in shouldn&#8217;t make it more possible.</p>
<p>&#8211;Loren</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dave</title>
		<link>http://blogs.mathworks.com/loren/2009/06/03/hold-everything/#comment-32063</link>
		<dc:creator>Dave</dc:creator>
		<pubDate>Thu, 24 Feb 2011 16:46:06 +0000</pubDate>
		<guid isPermaLink="false">http://blogs.mathworks.com/loren/2009/06/03/hold-everything/#comment-32063</guid>
		<description>I should have added
&lt;pre&gt;
legend(&#039;a&#039;,&#039;b&#039;)
&lt;/pre&gt;
to the end of my previous comment as my problem was that the legend was displaying the same color for both plots even though they plotted in different colors.</description>
		<content:encoded><![CDATA[<p>I should have added</p>
<pre>
legend('a','b')
</pre>
<p>to the end of my previous comment as my problem was that the legend was displaying the same color for both plots even though they plotted in different colors.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dave</title>
		<link>http://blogs.mathworks.com/loren/2009/06/03/hold-everything/#comment-32062</link>
		<dc:creator>Dave</dc:creator>
		<pubDate>Thu, 24 Feb 2011 16:41:40 +0000</pubDate>
		<guid isPermaLink="false">http://blogs.mathworks.com/loren/2009/06/03/hold-everything/#comment-32062</guid>
		<description>I just spend a day figuring out that the array I was trying to plot was too long.  I followed your example and it worked perfectly, then I followed your example with my matrix and it did not work, but I discovered a work around for long sets of data.  Instead of...
&lt;pre&gt;
plot(X1,Y1,&#039;color&#039;,[0 0 1])
hold on
plot(X2,Y2,&#039;color&#039;,[0 0.5 0])
hold off
legend(&#039;a&#039;,&#039;b&#039;)
&lt;/pre&gt;
I had to do...
&lt;pre&gt;
plot(X1(1:length(X1)),Y1(1:length(X1)),&#039;color&#039;,[0 0 1])
hold on
plot(X2(1:length(X2)),Y2(1:length(X2)),&#039;color&#039;,[0 0.5 0])
hold off
&lt;/pre&gt;
I am not sure how long your data has to be before you have to use this method, but mine had 1729 data points.</description>
		<content:encoded><![CDATA[<p>I just spend a day figuring out that the array I was trying to plot was too long.  I followed your example and it worked perfectly, then I followed your example with my matrix and it did not work, but I discovered a work around for long sets of data.  Instead of&#8230;</p>
<pre>
plot(X1,Y1,'color',[0 0 1])
hold on
plot(X2,Y2,'color',[0 0.5 0])
hold off
legend('a','b')
</pre>
<p>I had to do&#8230;</p>
<pre>
plot(X1(1:length(X1)),Y1(1:length(X1)),'color',[0 0 1])
hold on
plot(X2(1:length(X2)),Y2(1:length(X2)),'color',[0 0.5 0])
hold off
</pre>
<p>I am not sure how long your data has to be before you have to use this method, but mine had 1729 data points.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Loren</title>
		<link>http://blogs.mathworks.com/loren/2009/06/03/hold-everything/#comment-31329</link>
		<dc:creator>Loren</dc:creator>
		<pubDate>Mon, 10 May 2010 01:17:44 +0000</pubDate>
		<guid isPermaLink="false">http://blogs.mathworks.com/loren/2009/06/03/hold-everything/#comment-31329</guid>
		<description>Dawood-

Pass the 2 line handles you want to place in the legend as the first inputs to the legend function.  You can find more information on the legend reference page: http://www.mathworks.com/access/helpdesk/help/techdoc/ref/legend.html

--Loren</description>
		<content:encoded><![CDATA[<p>Dawood-</p>
<p>Pass the 2 line handles you want to place in the legend as the first inputs to the legend function.  You can find more information on the legend reference page: <a href="http://www.mathworks.com/access/helpdesk/help/techdoc/ref/legend.html" rel="nofollow">http://www.mathworks.com/access/helpdesk/help/techdoc/ref/legend.html</a></p>
<p>&#8211;Loren</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dawood Khan</title>
		<link>http://blogs.mathworks.com/loren/2009/06/03/hold-everything/#comment-31327</link>
		<dc:creator>Dawood Khan</dc:creator>
		<pubDate>Sun, 09 May 2010 20:46:19 +0000</pubDate>
		<guid isPermaLink="false">http://blogs.mathworks.com/loren/2009/06/03/hold-everything/#comment-31327</guid>
		<description>i have problem in legend. i have plot six signal  and now i want to assign legend to the first and last means sixth signal how can do that.</description>
		<content:encoded><![CDATA[<p>i have problem in legend. i have plot six signal  and now i want to assign legend to the first and last means sixth signal how can do that.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Loren</title>
		<link>http://blogs.mathworks.com/loren/2009/06/03/hold-everything/#comment-31301</link>
		<dc:creator>Loren</dc:creator>
		<pubDate>Sun, 02 May 2010 09:56:27 +0000</pubDate>
		<guid isPermaLink="false">http://blogs.mathworks.com/loren/2009/06/03/hold-everything/#comment-31301</guid>
		<description>Javier-

There is no function.  You&#039;d have to decide how to scale each of your curves yourself.  Another alternative may be to plot them in a log y-axis.  You can try this with semilogy, assuming all the values are non-negative.

--loren</description>
		<content:encoded><![CDATA[<p>Javier-</p>
<p>There is no function.  You&#8217;d have to decide how to scale each of your curves yourself.  Another alternative may be to plot them in a log y-axis.  You can try this with semilogy, assuming all the values are non-negative.</p>
<p>&#8211;loren</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Javier</title>
		<link>http://blogs.mathworks.com/loren/2009/06/03/hold-everything/#comment-31300</link>
		<dc:creator>Javier</dc:creator>
		<pubDate>Sat, 01 May 2010 16:19:50 +0000</pubDate>
		<guid isPermaLink="false">http://blogs.mathworks.com/loren/2009/06/03/hold-everything/#comment-31300</guid>
		<description>Dear all,

I have different 1d vectors to be plotted as curves into a single Figure. The y values across the vectors is not normalized. Therefore, I&#039;ve some vectors with pretty small y-values (10^-8), and others ranging from [0-1]. The highest value of a given vector is always 1.
Because of this, when I plot all the vectors together, some curves are almost displayed as being the x-axis (since the y-values are small). Is there any function that allows to normalize everything together, so as to be able to visualize the curves properly?

Best wishes</description>
		<content:encoded><![CDATA[<p>Dear all,</p>
<p>I have different 1d vectors to be plotted as curves into a single Figure. The y values across the vectors is not normalized. Therefore, I&#8217;ve some vectors with pretty small y-values (10^-8), and others ranging from [0-1]. The highest value of a given vector is always 1.<br />
Because of this, when I plot all the vectors together, some curves are almost displayed as being the x-axis (since the y-values are small). Is there any function that allows to normalize everything together, so as to be able to visualize the curves properly?</p>
<p>Best wishes</p>
]]></content:encoded>
	</item>
</channel>
</rss>

