From: ben harper on
i plot my results as
plot(x); hold on;
for the 1st condition.

but then i change my parameters and calculate new results
i run
plot(x);
again.

when i make this for 4-5 times i couldn't understand which curve shows which condition.
how can i make understandable??

i tried to make plot(x,'r') and change the curve color.
but it is hard to change the color of the curve, because i must do that manually.
any better suggestion please?
From: Dave Berger on
"ben harper" <controlusc(a)gmail.com> wrote in message <hid9av$ic4$1(a)fred.mathworks.com>...
> i plot my results as
> plot(x); hold on;
> for the 1st condition.
>
> but then i change my parameters and calculate new results
> i run
> plot(x);
> again.
>
> when i make this for 4-5 times i couldn't understand which curve shows which condition.
> how can i make understandable??
>
> i tried to make plot(x,'r') and change the curve color.
> but it is hard to change the color of the curve, because i must do that manually.
> any better suggestion please?

Instead of "hold on", try "hold all", which will change the the line color with each call to plot. If you want to control the color, specify it with something like plot(x,'r') for red lines.
-Dave
From: Dave Berger on
"Dave Berger" <dberger(a)REMOVEsysplan.com> wrote in message <hida1e$2ub$1(a)fred.mathworks.com>...
> "ben harper" <controlusc(a)gmail.com> wrote in message <hid9av$ic4$1(a)fred.mathworks.com>...
> > i plot my results as
> > plot(x); hold on;
> > for the 1st condition.
> >
> > but then i change my parameters and calculate new results
> > i run
> > plot(x);
> > again.
> >
> > when i make this for 4-5 times i couldn't understand which curve shows which condition.
> > how can i make understandable??
> >
> > i tried to make plot(x,'r') and change the curve color.
> > but it is hard to change the color of the curve, because i must do that manually.
> > any better suggestion please?
>
> Instead of "hold on", try "hold all", which will change the the line color with each call to plot. If you want to control the color, specify it with something like plot(x,'r') for red lines.
> -Dave

Sorry... just reread the second part of your message where you stated that you tried specifying the color. I guess I was confused about why it would be "hard to change the color of the curve". Personally, for simple x-y plots, I like different colors and symbols (with or without lines, depending on your data).
-Dave
From: ben harper on
"Dave Berger" <dberger(a)REMOVEsysplan.com> wrote in message <hidc6t$jn1$1(a)fred.mathworks.com>...
> "Dave Berger" <dberger(a)REMOVEsysplan.com> wrote in message <hida1e$2ub$1(a)fred.mathworks.com>...
> > "ben harper" <controlusc(a)gmail.com> wrote in message <hid9av$ic4$1(a)fred.mathworks.com>...
> > > i plot my results as
> > > plot(x); hold on;
> > > for the 1st condition.
> > >
> > > but then i change my parameters and calculate new results
> > > i run
> > > plot(x);
> > > again.
> > >
> > > when i make this for 4-5 times i couldn't understand which curve shows which condition.
> > > how can i make understandable??
> > >
> > > i tried to make plot(x,'r') and change the curve color.
> > > but it is hard to change the color of the curve, because i must do that manually.
> > > any better suggestion please?
> >
> > Instead of "hold on", try "hold all", which will change the the line color with each call to plot. If you want to control the color, specify it with something like plot(x,'r') for red lines.
> > -Dave
>
> Sorry... just reread the second part of your message where you stated that you tried specifying the color. I guess I was confused about why it would be "hard to change the color of the curve". Personally, for simple x-y plots, I like different colors and symbols (with or without lines, depending on your data).
> -Dave


Hmm Thank you Dave.
Changing the curve color is not hard, it is time consuming.
Because i try different conditions for my plant, and every time i change a parameter i change the color of curve.

When i try "hold all", it made my results readable.
But my new problem is, to put legend on same plot for each condition.

How can i show different curve names on same plot?

I'm so sorry for my english, i'm not a good english speaker.
From: us on
"ben harper" <controlusc(a)gmail.com> wrote in message <hid9av$ic4$1(a)fred.mathworks.com>...
> i plot my results as
> plot(x); hold on;
> for the 1st condition.
>
> but then i change my parameters and calculate new results
> i run
> plot(x);
> again.
>
> when i make this for 4-5 times i couldn't understand which curve shows which condition.
> how can i make understandable??
>
> i tried to make plot(x,'r') and change the curve color.
> but it is hard to change the color of the curve, because i must do that manually.
> any better suggestion please?

one of the many solutions is outlined below

nc=5; % <- #curves
lab={'a','bb','c','dd','e'};
cmap=jet(nc); % <- colormap
mrk={'s','o','+'}; % <- markers
nmrk=numel(mrk);
lh=nan(nc,1);
for i=1:nc
x=1:2*i;
y=i+.5*rand(size(x));
mix=rem(i-1,nmrk)+1;
% set graphics handle props during creation
% note: use LINE instead of PLOT -> no need for HOLD...
lh(i)=line(x,y,'marker',mrk{mix},'markerfacecolor',cmap(i,:));
end
% set graphics handle props in one shot...
set(lh,{'color'},num2cell(cmap,2));
% set legend
legend(lh,lab,'location','southeast');

us