<?xml version="1.0" encoding="UTF-8"?><!-- generator="wordpress/2.3.1" -->
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	>
<channel>
	<title>Comments on: Colors for Your Multi-Line Plots</title>
	<link>http://blogs.mathworks.com/pick/2008/08/15/colors-for-your-multi-line-plots/</link>
	<description>&#60;a href="http://www.mathworks.com/matlabcentral/fileexchange/loadAuthor.do?objectId=969735&#38;objectType=author"&#62;Bob&#60;/a&#62;, &#60;a href="http://www.mathworks.com/matlabcentral/fileexchange/loadAuthor.do?objectId=1093599&#38;objectType=author"&#62;Brett&#60;/a&#62; &#38; &#60;a href="http://www.mathworks.com/matlabcentral/fileexchange/loadAuthor.do?objectId=1094142&#38;objectType=author"&#62;Jiro&#60;/a&#62; share favorite user-contributed submissions from the File Exchange.</description>
	<pubDate>Mon, 23 Nov 2009 01:06:51 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.3.1</generator>
		<item>
		<title>By: Markus</title>
		<link>http://blogs.mathworks.com/pick/2008/08/15/colors-for-your-multi-line-plots/#comment-12842</link>
		<dc:creator>Markus</dc:creator>
		<pubDate>Sun, 14 Sep 2008 18:05:16 +0000</pubDate>
		<guid>http://blogs.mathworks.com/pick/2008/08/15/colors-for-your-multi-line-plots/#comment-12842</guid>
		<description>Hi Doug, 

long ago I fiddled out a number of distinguishable colors by hand. You find them in this matrix:

&lt;pre&gt; &lt;code&gt;
colororder = [
	0.00  0.00  1.00
	0.00  0.50  0.00 
	1.00  0.00  0.00 
	0.00  0.75  0.75
	0.75  0.00  0.75
	0.75  0.75  0.00 
	0.25  0.25  0.25
	0.75  0.25  0.25
	0.95  0.95  0.00 
	0.25  0.25  0.75
	0.75  0.75  0.75
	0.00  1.00  0.00 
	0.76  0.57  0.17
	0.54  0.63  0.22
	0.34  0.57  0.92
	1.00  0.10  0.60
	0.88  0.75  0.73
	0.10  0.49  0.47
	0.66  0.34  0.65
	0.99  0.41  0.23
];
&lt;/pre&gt;&lt;/code&gt;

Since then, setting the default color order is in my Matlab startup file.

Another good way to find distinguishable colors is to use the color spiral of James McNames: http://bsp.pdx.edu/Software/

Yours
Markus</description>
		<content:encoded><![CDATA[<p>Hi Doug, </p>
<p>long ago I fiddled out a number of distinguishable colors by hand. You find them in this matrix:</p>
<pre> <code>
colororder = [
	0.00  0.00  1.00
	0.00  0.50  0.00
	1.00  0.00  0.00
	0.00  0.75  0.75
	0.75  0.00  0.75
	0.75  0.75  0.00
	0.25  0.25  0.25
	0.75  0.25  0.25
	0.95  0.95  0.00
	0.25  0.25  0.75
	0.75  0.75  0.75
	0.00  1.00  0.00
	0.76  0.57  0.17
	0.54  0.63  0.22
	0.34  0.57  0.92
	1.00  0.10  0.60
	0.88  0.75  0.73
	0.10  0.49  0.47
	0.66  0.34  0.65
	0.99  0.41  0.23
];
</code></pre>
<p></p>
<p>Since then, setting the default color order is in my Matlab startup file.</p>
<p>Another good way to find distinguishable colors is to use the color spiral of James McNames: <a href="http://bsp.pdx.edu/Software/" rel="nofollow">http://bsp.pdx.edu/Software/</a></p>
<p>Yours<br />
Markus</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Paul Mennen</title>
		<link>http://blogs.mathworks.com/pick/2008/08/15/colors-for-your-multi-line-plots/#comment-12460</link>
		<dc:creator>Paul Mennen</dc:creator>
		<pubDate>Sun, 17 Aug 2008 00:12:04 +0000</pubDate>
		<guid>http://blogs.mathworks.com/pick/2008/08/15/colors-for-your-multi-line-plots/#comment-12460</guid>
		<description>&#62; When I have this many lines, I often wonder what
&#62; the best way to put a legend is.

Yes I agree that the usual Matlab legend is not practical with many traces (such as 50 as in your example). The color
matrix is a clever alternative. However if you really need to identify the individual traces by name, that doesn't help.

There is yet another alternative for this problem that you may not be aware of. It is to use "plt" an alternative to matlab's "plot" and "plotyy" that you will find on the file exchange at:

http://www.mathworks.com/matlabcentral/fileexchange/loadFile.do?objectId=4936&#38;objectType=file

(or just search for "plt".)

If you run the demo program "demo\pltn.m" you will see a plot with 99 traces, each one with a unique name and a unique color!

While identifying all 99 traces by color alone is a tall order, most people can distinguish at least the first 30 traces or so by color. One advantage of this legend style (besides being compact enough to be practical) is that if you can't tell which trace is which based on color alone, just click on the legend entry and the trace will toggle, making it immediately obvious.

Although you can tell plt to use Matlab's default color scheme, or to use colors generated by VARYCOLOR, I've found that the problem of identifying more than about 10 traces using color is much easier when a black (or very dark) background is used for the plotting area. Although this is shocking at first, the advantages become more clear once you get used to it. (This is the default with plt). I think the reason for this is that you can maximize color saturation and plot contrast at the same time. The situation on paper (hardcopy) is reversed, I believe because of the distinction between emitted and reflected light.

If you do get a chance to try out plt, I encourage you to run "demo\demoplt.m" and also to peruse the extensive documentation (plt.chm). If you have any questions or comments about it, I'm all ears.

~Paul</description>
		<content:encoded><![CDATA[<p>&gt; When I have this many lines, I often wonder what<br />
&gt; the best way to put a legend is.</p>
<p>Yes I agree that the usual Matlab legend is not practical with many traces (such as 50 as in your example). The color<br />
matrix is a clever alternative. However if you really need to identify the individual traces by name, that doesn&#8217;t help.</p>
<p>There is yet another alternative for this problem that you may not be aware of. It is to use &#8220;plt&#8221; an alternative to matlab&#8217;s &#8220;plot&#8221; and &#8220;plotyy&#8221; that you will find on the file exchange at:</p>
<p><a href="http://www.mathworks.com/matlabcentral/fileexchange/loadFile.do?objectId=4936&amp;objectType=file" rel="nofollow">http://www.mathworks.com/matlabcentral/fileexchange/loadFile.do?objectId=4936&amp;objectType=file</a></p>
<p>(or just search for &#8220;plt&#8221;.)</p>
<p>If you run the demo program &#8220;demo\pltn.m&#8221; you will see a plot with 99 traces, each one with a unique name and a unique color!</p>
<p>While identifying all 99 traces by color alone is a tall order, most people can distinguish at least the first 30 traces or so by color. One advantage of this legend style (besides being compact enough to be practical) is that if you can&#8217;t tell which trace is which based on color alone, just click on the legend entry and the trace will toggle, making it immediately obvious.</p>
<p>Although you can tell plt to use Matlab&#8217;s default color scheme, or to use colors generated by VARYCOLOR, I&#8217;ve found that the problem of identifying more than about 10 traces using color is much easier when a black (or very dark) background is used for the plotting area. Although this is shocking at first, the advantages become more clear once you get used to it. (This is the default with plt). I think the reason for this is that you can maximize color saturation and plot contrast at the same time. The situation on paper (hardcopy) is reversed, I believe because of the distinction between emitted and reflected light.</p>
<p>If you do get a chance to try out plt, I encourage you to run &#8220;demo\demoplt.m&#8221; and also to peruse the extensive documentation (plt.chm). If you have any questions or comments about it, I&#8217;m all ears.</p>
<p>~Paul</p>
]]></content:encoded>
	</item>
</channel>
</rss>
