<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0">
  <channel>
    <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/258032</link>
    <title>MATLAB Central Newsreader - Reset the Color Order Property of an axis</title>
    <description>Feed for thread: Reset the Color Order Property of an 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>Fri, 07 Aug 2009 21:32:02 -0400</pubDate>
      <title>Reset the Color Order Property of an axis</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/258032#671531</link>
      <author>Camron Call</author>
      <description>I saw this question on the Expert's Exchange and I want to know the answer without paying for it. &lt;br&gt;
&lt;br&gt;
I was wondering does anyone know how to reset the color order and line style manually in matlab?&lt;br&gt;
I know each time you call high-level functions like 'plot' and 'plot3' it resets them automatically (provided you didn't do a 'hold on' beforehand) but how do you do this manually?&lt;br&gt;
I'm NOT trying to set a new color order or line style, I just want to reset them so that my next call to 'plot' starts at the beginning of the current color order and line style lists again and continues.&lt;br&gt;
&lt;br&gt;
Thanks in advance.</description>
    </item>
    <item>
      <pubDate>Fri, 07 Aug 2009 21:51:39 -0400</pubDate>
      <title>Re: Reset the Color Order Property of an axis</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/258032#671534</link>
      <author>CTRAX</author>
      <description>On Aug 7, 5:32&#160;pm, &quot;Camron Call&quot; &amp;lt;camronc...@gmail.cam&amp;gt; wrote:&lt;br&gt;
&amp;gt; I saw this question on the Expert's Exchange and I want to know the answer without paying for it.&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; I was wondering does anyone know how to reset the color order and line style manually in matlab?&lt;br&gt;
&amp;gt; I know each time you call high-level functions like 'plot' and 'plot3' it resets them automatically (provided you didn't do a 'hold on' beforehand) but how do you do this manually?&lt;br&gt;
&amp;gt; I'm NOT trying to set a new color order or line style, I just want to reset them so that my next call to 'plot' starts at the beginning of the current color order and line style lists again and continues.&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; Thanks in advance.&lt;br&gt;
&lt;br&gt;
Yes, Expert's Exchange is a pile of shite.&lt;br&gt;
Here's one way you can do this:&lt;br&gt;
&lt;br&gt;
%store the originals&lt;br&gt;
origCO=get(gcf,'DefaultAxesColorOrder');&lt;br&gt;
origSO=get(gcf,'DefaultAxesLineStyleOrder');&lt;br&gt;
&lt;br&gt;
%set them to something else:&lt;br&gt;
set(gcf,'DefaultAxesColorOrder',[1 1 0;0 1 1;1 0 1],...&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;'DefaultAxesLineStyleOrder',':|-|--')&lt;br&gt;
&lt;br&gt;
%back to default&lt;br&gt;
set(gcf,'DefaultAxesColorOrder',origCO,...&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;'DefaultAxesLineStyleOrder','origSO)&lt;br&gt;
&lt;br&gt;
%You can also set them on a global level. Try:&lt;br&gt;
get(0,'DefaultAxesColorOrder')</description>
    </item>
    <item>
      <pubDate>Fri, 07 Aug 2009 22:25:03 -0400</pubDate>
      <title>Re: Reset the Color Order Property of an axis</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/258032#671539</link>
      <author>Camron Call</author>
      <description>This doesn't seem to be working for me.  &lt;br&gt;
&lt;br&gt;
This loop plots the test data that is selected by the user.  There may be any number of plots to be compared on the same axis:&lt;br&gt;
&lt;br&gt;
% code&lt;br&gt;
hold all;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;for j=1:length(testrow)&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;plot(xaxis{j,:}',testdata{testrow(j),:}','LineWidth',lw)&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;end&lt;br&gt;
&lt;br&gt;
%/end code&lt;br&gt;
&lt;br&gt;
testrow is a vector containing the selected rows from a list box.&lt;br&gt;
&lt;br&gt;
Does the hold all;   command make it so that the solution in the previous post does not work?  Every time my plot button is pressed, the colors start off with the next in line and not with the regular blue.</description>
    </item>
    <item>
      <pubDate>Fri, 07 Aug 2009 22:55:04 -0400</pubDate>
      <title>Re: Reset the Color Order Property of an axis</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/258032#671545</link>
      <author>Camron Call</author>
      <description>This doesn't seem to be working for me.  &lt;br&gt;
&lt;br&gt;
This loop plots the test data that is selected by the user.  There may be any number of plots to be compared on the same axis:&lt;br&gt;
&lt;br&gt;
% code&lt;br&gt;
hold all;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;for j=1:length(testrow)&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;plot(xaxis{j,:}',testdata{testrow(j),:}','LineWidth',lw)&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;end&lt;br&gt;
&lt;br&gt;
%/end code&lt;br&gt;
&lt;br&gt;
testrow is a vector containing the selected rows from a list box.&lt;br&gt;
&lt;br&gt;
Does the hold all;   command make it so that the solution in the previous post does not work?  Every time my plot button is pressed, the colors start off with the next in line and not with the regular blue.</description>
    </item>
    <item>
      <pubDate>Fri, 07 Aug 2009 23:00:09 -0400</pubDate>
      <title>Re: Reset the Color Order Property of an axis</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/258032#671548</link>
      <author>dpb</author>
      <description>Camron Call wrote:&lt;br&gt;
&amp;gt; This doesn't seem to be working for me.&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; This loop plots the test data that is selected by the user.  There&lt;br&gt;
&amp;gt; may be any number of plots to be compared on the same axis:&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; % code hold all; for j=1:length(testrow) &lt;br&gt;
&amp;gt; plot(xaxis{j,:}',testdata{testrow(j),:}','LineWidth',lw) end&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; %/end code&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; testrow is a vector containing the selected rows from a list box.&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; Does the hold all;   command make it so that the solution in the&lt;br&gt;
&amp;gt; previous post does not work?  Every time my plot button is pressed,&lt;br&gt;
&amp;gt; the colors start off with the next in line and not with the regular&lt;br&gt;
&amp;gt; blue.&lt;br&gt;
&lt;br&gt;
I suspect so --&lt;br&gt;
&lt;br&gt;
I'd first try to reset the default order in the loop and see if it &lt;br&gt;
starts over again; I'm thinking even that may not.&lt;br&gt;
&lt;br&gt;
If not, you would probably have to keep up w/ the number of plots and &lt;br&gt;
rearrange the order to make the position of the first default color that &lt;br&gt;
position in the color vector.&lt;br&gt;
&lt;br&gt;
AFAIK there's no property user-settable that lets you only reset the &lt;br&gt;
internal index into the order array for color (or linestyle either, for &lt;br&gt;
that matter).&lt;br&gt;
&lt;br&gt;
Seems like another of the &quot;so obvious but...&quot; kinda' missing &lt;br&gt;
details....I've noticed it before; unlike some others that come up from &lt;br&gt;
time to time I don't recall this is one I ever formally submitted a &lt;br&gt;
feature request for.&lt;br&gt;
&lt;br&gt;
--</description>
    </item>
    <item>
      <pubDate>Fri, 07 Aug 2009 23:33:01 -0400</pubDate>
      <title>Re: Reset the Color Order Property of an axis</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/258032#671556</link>
      <author>Camron Call</author>
      <description>I had thought of keeping track of the order like you mentioned.  The more I think about it, it might not be to difficult.  Thanks to all for helping.&lt;br&gt;
&lt;br&gt;
Cam</description>
    </item>
    <item>
      <pubDate>Fri, 07 Aug 2009 23:45:24 -0400</pubDate>
      <title>Re: Reset the Color Order Property of an axis</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/258032#671559</link>
      <author>dpb</author>
      <description>Camron Call wrote:&lt;br&gt;
&amp;gt; I had thought of keeping track of the order like you mentioned.  The&lt;br&gt;
&amp;gt; more I think about it, it might not be to difficult.  Thanks to all&lt;br&gt;
&amp;gt; for helping.&lt;br&gt;
&lt;br&gt;
Oh, I agree that it's not particularly hard at all; just one of those &lt;br&gt;
pita details that seems as if shouldn't be necessary is all...&lt;br&gt;
&lt;br&gt;
--</description>
    </item>
    <item>
      <pubDate>Sat, 08 Aug 2009 01:18:01 -0400</pubDate>
      <title>Re: Reset the Color Order Property of an axis</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/258032#671585</link>
      <author>Camron Call</author>
      <description>&amp;nbsp;&lt;br&gt;
&amp;gt; Oh, I agree that it's not particularly hard at all; just one of those &lt;br&gt;
&amp;gt; pita details that seems as if shouldn't be necessary is all...&lt;br&gt;
&amp;gt; &lt;br&gt;
&lt;br&gt;
AMEN!!!</description>
    </item>
  </channel>
</rss>

