From: omegayen on
Hi,

I recently installed matlab 2010a and am having an issue where when I plot it is making the plot of bunch of colors on the color wheel. I was under the impression the default plot command would make the color blue..... which was the case in 2009, is this a bug?

all I am doing is

plot(variable,xlabel('labelhere'),ylabel('labelhere'))
From: Wayne King on
"omegayen " <omegayen(a)ameritech.net> wrote in message <hqkp7h$n15$1(a)fred.mathworks.com>...
> Hi,
>
> I recently installed matlab 2010a and am having an issue where when I plot it is making the plot of bunch of colors on the color wheel. I was under the impression the default plot command would make the color blue..... which was the case in 2009, is this a bug?
>
> all I am doing is
>
> plot(variable,xlabel('labelhere'),ylabel('labelhere'))

Hi, I'm not sure what you mean for your particular use case, or the syntax with xlabel() and ylabel() inside the plot command, but you can see the default color order in MATLAB with

get(gca,'ColorOrder')

The first row of the returned matrix is [0 0 1], which shows that the default is still blue in R2010a.

X = randn(100,3);
ColOrd = get(gca,'colororder');
plot(X);
legend('First','Second','Third');
ColOrd(1:3,:)

Compare the colors to the first three rows of ColOrd. You can define a color order for your current figure with:

set(gcf,'DefaultAxesColorOrder',[1 0 0;0 1 0;0 0 1])
using the order red, green, blue.

or for your MATLAB session with

set(0,'DefaultAxesColorOrder',[1 0 0;0 1 0;0 0 1])

If you place the previous line in a startup.m file you can keep it each time MATLAB starts.

Hope that helps,
Wayne
From: omegayen on
"Wayne King" <wmkingty(a)gmail.com> wrote in message <hqkqs0$ojv$1(a)fred.mathworks.com>...
> "omegayen " <omegayen(a)ameritech.net> wrote in message <hqkp7h$n15$1(a)fred.mathworks.com>...
> > Hi,
> >
> > I recently installed matlab 2010a and am having an issue where when I plot it is making the plot of bunch of colors on the color wheel. I was under the impression the default plot command would make the color blue..... which was the case in 2009, is this a bug?
> >
> > all I am doing is
> >
> > plot(variable,xlabel('labelhere'),ylabel('labelhere'))
>
> Hi, I'm not sure what you mean for your particular use case, or the syntax with xlabel() and ylabel() inside the plot command, but you can see the default color order in MATLAB with
>
> get(gca,'ColorOrder')
>
> The first row of the returned matrix is [0 0 1], which shows that the default is still blue in R2010a.
>
> X = randn(100,3);
> ColOrd = get(gca,'colororder');
> plot(X);
> legend('First','Second','Third');
> ColOrd(1:3,:)
>
> Compare the colors to the first three rows of ColOrd. You can define a color order for your current figure with:
>
> set(gcf,'DefaultAxesColorOrder',[1 0 0;0 1 0;0 0 1])
> using the order red, green, blue.
>
> or for your MATLAB session with
>
> set(0,'DefaultAxesColorOrder',[1 0 0;0 1 0;0 0 1])
>
> If you place the previous line in a startup.m file you can keep it each time MATLAB starts.
>
> Hope that helps,
> Wayne

thanks Wayne I had a silly mistake, figured it out