Path: news.mathworks.com!newsfeed-00.mathworks.com!newsfeed2.dallas1.level3.net!news.level3.com!postnews.google.com!q14g2000vbi.googlegroups.com!not-for-mail
From: CTRAX <raacampbell@gmail.com>
Newsgroups: comp.soft-sys.matlab
Subject: Re: Reset the Color Order Property of an axis
Date: Fri, 7 Aug 2009 14:51:39 -0700 (PDT)
Organization: http://groups.google.com
Lines: 32
Message-ID: <a49d4c9c-db63-4568-bf94-4e446d9e9824@q14g2000vbi.googlegroups.com>
References: <h5i6gi$t92$1@fred.mathworks.com>
NNTP-Posting-Host: 143.48.24.13
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
X-Trace: posting.google.com 1249681899 10436 127.0.0.1 (7 Aug 2009 21:51:39 GMT)
X-Complaints-To: groups-abuse@google.com
NNTP-Posting-Date: Fri, 7 Aug 2009 21:51:39 +0000 (UTC)
Complaints-To: groups-abuse@google.com
Injection-Info: q14g2000vbi.googlegroups.com; posting-host=143.48.24.13; 
	posting-account=so3QVAoAAABem0HKjRL9gEY6t1B6b3HZ
User-Agent: G2/1.0
X-HTTP-UserAgent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.0.13) 
	Gecko/2009080315 Ubuntu/9.04 (jaunty) Firefox/3.0.13,gzip(gfe),gzip(gfe)
Xref: news.mathworks.com comp.soft-sys.matlab:561722


On Aug 7, 5:32 pm, "Camron Call" <camronc...@gmail.cam> wrote:
> I saw this question on the Expert's Exchange and I want to know the answer without paying for it.
>
> I was wondering does anyone know how to reset the color order and line style manually in matlab?
> 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?
> 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.
>
> Thanks in advance.

Yes, Expert's Exchange is a pile of shite.
Here's one way you can do this:

%store the originals
origCO=get(gcf,'DefaultAxesColorOrder');
origSO=get(gcf,'DefaultAxesLineStyleOrder');

%set them to something else:
set(gcf,'DefaultAxesColorOrder',[1 1 0;0 1 1;1 0 1],...
      'DefaultAxesLineStyleOrder',':|-|--')

%back to default
set(gcf,'DefaultAxesColorOrder',origCO,...
      'DefaultAxesLineStyleOrder','origSO)

%You can also set them on a global level. Try:
get(0,'DefaultAxesColorOrder')