<?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: Colors for Your Multi-Line Plots</title>
	<atom:link href="http://blogs.mathworks.com/pick/2008/08/15/colors-for-your-multi-line-plots/feed/" rel="self" type="application/rss+xml" />
	<link>http://blogs.mathworks.com/pick/2008/08/15/colors-for-your-multi-line-plots/</link>
	<description>&#60;a href=&#34;http://www.mathworks.com/matlabcentral/fileexchange/loadAuthor.do?objectId=1093599&#38;objectType=author&#34;&#62;Brett&#60;/a&#62; &#38; &#60;a href=&#34;http://www.mathworks.com/matlabcentral/fileexchange/loadAuthor.do?objectId=1094142&#38;objectType=author&#34;&#62;Jiro&#60;/a&#62; share favorite user-contributed submissions from the File Exchange.</description>
	<lastBuildDate>Tue, 30 Apr 2013 09:18:26 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
	<item>
		<title>By: Udi</title>
		<link>http://blogs.mathworks.com/pick/2008/08/15/colors-for-your-multi-line-plots/#comment-17340</link>
		<dc:creator>Udi</dc:creator>
		<pubDate>Sun, 16 Dec 2012 17:09:22 +0000</pubDate>
		<guid isPermaLink="false">http://blogs.mathworks.com/pick/2008/08/15/colors-for-your-multi-line-plots/#comment-17340</guid>
		<description>I&#039;m trying this on a series of ~2600 lines and get black colorbar
:(
Matlab 2011b. My code (relevant parts):

while j&lt;length(T)-1
 if mod(j+1,1000)==0
  ...
    if j+1==1000
      set(gca,&#039;fontsize&#039;,24, &#039;ColorOrder&#039;, plat); hold all;
      ...
    end
    plot(X,u(2,:),&#039;linewidth&#039;,2); 
    if j+1==length(plat(:,1))
       set(gca, &#039;Colormap&#039;, plat); 
       colorbar(&#039;ColorOrder&#039;,plat)
    end
  end
    j=j+1;
    ...
end</description>
		<content:encoded><![CDATA[<p>I&#8217;m trying this on a series of ~2600 lines and get black colorbar<br />
:(<br />
Matlab 2011b. My code (relevant parts):</p>
<p>while j&lt;length(T)-1<br />
 if mod(j+1,1000)==0<br />
  &#8230;<br />
    if j+1==1000<br />
      set(gca,&#039;fontsize&#039;,24, &#039;ColorOrder&#039;, plat); hold all;<br />
      &#8230;<br />
    end<br />
    plot(X,u(2,:),&#039;linewidth&#039;,2);<br />
    if j+1==length(plat(:,1))<br />
       set(gca, &#039;Colormap&#039;, plat);<br />
       colorbar(&#039;ColorOrder&#039;,plat)<br />
    end<br />
  end<br />
    j=j+1;<br />
    &#8230;<br />
end</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jiro Doke</title>
		<link>http://blogs.mathworks.com/pick/2008/08/15/colors-for-your-multi-line-plots/#comment-14803</link>
		<dc:creator>Jiro Doke</dc:creator>
		<pubDate>Thu, 27 Sep 2012 14:51:11 +0000</pubDate>
		<guid isPermaLink="false">http://blogs.mathworks.com/pick/2008/08/15/colors-for-your-multi-line-plots/#comment-14803</guid>
		<description>@Christine,

The function &quot;lines&quot; give you the default MATLAB line colors. In the above example, if you type

&lt;code&gt;ColorSet = lines(50);
&lt;/code&gt;

it will give you the default colors. However, &quot;lines&quot; only give you 7 distinct colors, and it simply repeats itself after that.</description>
		<content:encoded><![CDATA[<p>@Christine,</p>
<p>The function &#8220;lines&#8221; give you the default MATLAB line colors. In the above example, if you type</p>
<p><code>ColorSet = lines(50);<br />
</code></p>
<p>it will give you the default colors. However, &#8220;lines&#8221; only give you 7 distinct colors, and it simply repeats itself after that.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Christine Milton</title>
		<link>http://blogs.mathworks.com/pick/2008/08/15/colors-for-your-multi-line-plots/#comment-14802</link>
		<dc:creator>Christine Milton</dc:creator>
		<pubDate>Thu, 27 Sep 2012 14:09:53 +0000</pubDate>
		<guid isPermaLink="false">http://blogs.mathworks.com/pick/2008/08/15/colors-for-your-multi-line-plots/#comment-14802</guid>
		<description>Where in the code can you tell it to automatically use Matlab&#039;s default colors?</description>
		<content:encoded><![CDATA[<p>Where in the code can you tell it to automatically use Matlab&#8217;s default colors?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Usman Azeem</title>
		<link>http://blogs.mathworks.com/pick/2008/08/15/colors-for-your-multi-line-plots/#comment-14503</link>
		<dc:creator>Usman Azeem</dc:creator>
		<pubDate>Mon, 23 Apr 2012 07:27:46 +0000</pubDate>
		<guid isPermaLink="false">http://blogs.mathworks.com/pick/2008/08/15/colors-for-your-multi-line-plots/#comment-14503</guid>
		<description>Chval da Bacha !!!! Banda Profile  pict hee koi kaam ki lagaa deta hai... Ddeengi boothi wala... !!!!</description>
		<content:encoded><![CDATA[<p>Chval da Bacha !!!! Banda Profile  pict hee koi kaam ki lagaa deta hai&#8230; Ddeengi boothi wala&#8230; !!!!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: dp</title>
		<link>http://blogs.mathworks.com/pick/2008/08/15/colors-for-your-multi-line-plots/#comment-14405</link>
		<dc:creator>dp</dc:creator>
		<pubDate>Mon, 30 Jan 2012 10:25:10 +0000</pubDate>
		<guid isPermaLink="false">http://blogs.mathworks.com/pick/2008/08/15/colors-for-your-multi-line-plots/#comment-14405</guid>
		<description>Thanks very much</description>
		<content:encoded><![CDATA[<p>Thanks very much</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jacob</title>
		<link>http://blogs.mathworks.com/pick/2008/08/15/colors-for-your-multi-line-plots/#comment-14359</link>
		<dc:creator>Jacob</dc:creator>
		<pubDate>Thu, 08 Dec 2011 22:01:48 +0000</pubDate>
		<guid isPermaLink="false">http://blogs.mathworks.com/pick/2008/08/15/colors-for-your-multi-line-plots/#comment-14359</guid>
		<description>Hello,

How do you call out the colors from the color map and apply them to individual plots?

For example, say I wanted to use color 10 from the colorbar generated from the code below. How could I put it in my plot command? Is it done just like calling out the default colors?

I know I could just use one of the default colors but I have 12 plots that require different colors for my project. 



NumberOfPlots=12;
 
          ColorSet=varycolor(NumberOfPlots);
  
          figure
          hold on;
  
          for m=1:NumberOfPlots
              plot(ones(20,1)*m,&#039;Color&#039;,ColorSet(m,:))
          end
set(gcf, &#039;Colormap&#039;, ColorSet);
colorbar

plot(x,y,&#039;?&#039;)
</description>
		<content:encoded><![CDATA[<p>Hello,</p>
<p>How do you call out the colors from the color map and apply them to individual plots?</p>
<p>For example, say I wanted to use color 10 from the colorbar generated from the code below. How could I put it in my plot command? Is it done just like calling out the default colors?</p>
<p>I know I could just use one of the default colors but I have 12 plots that require different colors for my project. </p>
<p>NumberOfPlots=12;</p>
<p>          ColorSet=varycolor(NumberOfPlots);</p>
<p>          figure<br />
          hold on;</p>
<p>          for m=1:NumberOfPlots<br />
              plot(ones(20,1)*m,&#8217;Color&#8217;,ColorSet(m,:))<br />
          end<br />
set(gcf, &#8216;Colormap&#8217;, ColorSet);<br />
colorbar</p>
<p>plot(x,y,&#8217;?')</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: naga</title>
		<link>http://blogs.mathworks.com/pick/2008/08/15/colors-for-your-multi-line-plots/#comment-14303</link>
		<dc:creator>naga</dc:creator>
		<pubDate>Mon, 07 Nov 2011 14:04:58 +0000</pubDate>
		<guid isPermaLink="false">http://blogs.mathworks.com/pick/2008/08/15/colors-for-your-multi-line-plots/#comment-14303</guid>
		<description>sorry...just now i downloaded. it works grate......

thank you very much</description>
		<content:encoded><![CDATA[<p>sorry&#8230;just now i downloaded. it works grate&#8230;&#8230;</p>
<p>thank you very much</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: jiro</title>
		<link>http://blogs.mathworks.com/pick/2008/08/15/colors-for-your-multi-line-plots/#comment-14302</link>
		<dc:creator>jiro</dc:creator>
		<pubDate>Sun, 06 Nov 2011 23:16:18 +0000</pubDate>
		<guid isPermaLink="false">http://blogs.mathworks.com/pick/2008/08/15/colors-for-your-multi-line-plots/#comment-14302</guid>
		<description>@naga,

Did you download “varycolor” from the File Exchange? Also, make sure that you put the function at a location where MATLAB can find it. Read about it &lt;a href=&quot;http://www.mathworks.com/help/techdoc/matlab_env/br5tea6-6.html&quot; rel=&quot;nofollow&quot;&gt;here&lt;/a&gt;.</description>
		<content:encoded><![CDATA[<p>@naga,</p>
<p>Did you download “varycolor” from the File Exchange? Also, make sure that you put the function at a location where MATLAB can find it. Read about it <a href="http://www.mathworks.com/help/techdoc/matlab_env/br5tea6-6.html" rel="nofollow">here</a>.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: naga</title>
		<link>http://blogs.mathworks.com/pick/2008/08/15/colors-for-your-multi-line-plots/#comment-14299</link>
		<dc:creator>naga</dc:creator>
		<pubDate>Sat, 05 Nov 2011 14:57:27 +0000</pubDate>
		<guid isPermaLink="false">http://blogs.mathworks.com/pick/2008/08/15/colors-for-your-multi-line-plots/#comment-14299</guid>
		<description>hi i am using like this please help me:

i have a cell array z{k}, i want to plot it with different colours, i tried ur code, but its not working please help me. 

ColorSet = varycolor(280);


set(gca, &#039;ColorOrder&#039;, ColorSet);
plot(z{k})
hold on

when i tried this, i am getting error like this

??? Undefined function or method &#039;varycolor&#039; for input
arguments of type &#039;double&#039;.</description>
		<content:encoded><![CDATA[<p>hi i am using like this please help me:</p>
<p>i have a cell array z{k}, i want to plot it with different colours, i tried ur code, but its not working please help me. </p>
<p>ColorSet = varycolor(280);</p>
<p>set(gca, &#8216;ColorOrder&#8217;, ColorSet);<br />
plot(z{k})<br />
hold on</p>
<p>when i tried this, i am getting error like this</p>
<p>??? Undefined function or method &#8216;varycolor&#8217; for input<br />
arguments of type &#8216;double&#8217;.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Scott Otterson</title>
		<link>http://blogs.mathworks.com/pick/2008/08/15/colors-for-your-multi-line-plots/#comment-14280</link>
		<dc:creator>Scott Otterson</dc:creator>
		<pubDate>Fri, 21 Oct 2011 14:26:02 +0000</pubDate>
		<guid isPermaLink="false">http://blogs.mathworks.com/pick/2008/08/15/colors-for-your-multi-line-plots/#comment-14280</guid>
		<description>Markus:  Thanks!  I&#039;m using this.

Geoffrey: I haven&#039;t seen your code but my guess is that you&#039;re setting the color order and then calling plot().  

The problem with this is that plot() resets the ColorOrder property.  You can prevent that by preceding plot() with a command that freezes ColorOrder.  Either like this:

&lt;pre&gt;
  set(gca, &#039;ColorOrder&#039;, colororder);
  hold on
  plot(...)
&lt;/pre&gt;
&lt;/b&gt;

or like this:

&lt;pre&gt;
  set(gca, &#039;ColorOrder&#039;, colororder);
  set(gca,&#039;NextPlot&#039;,&#039;replacechildren&#039;)
  plot(...)
&lt;/pre&gt;
&lt;/b&gt;</description>
		<content:encoded><![CDATA[<p>Markus:  Thanks!  I&#8217;m using this.</p>
<p>Geoffrey: I haven&#8217;t seen your code but my guess is that you&#8217;re setting the color order and then calling plot().  </p>
<p>The problem with this is that plot() resets the ColorOrder property.  You can prevent that by preceding plot() with a command that freezes ColorOrder.  Either like this:</p>
<pre>
  set(gca, 'ColorOrder', colororder);
  hold on
  plot(...)
</pre>
<p></p>
<p>or like this:</p>
<pre>
  set(gca, 'ColorOrder', colororder);
  set(gca,'NextPlot','replacechildren')
  plot(...)
</pre>
<p></p>
]]></content:encoded>
	</item>
</channel>
</rss>
