From: Dave Berger on
"us " <us(a)neurol.unizh.ch> wrote in message <hidh0k$ntq$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?
>
> 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

Ben,

To get a specific solution, please post your code or code that exemplifies the problem. The stuff that Us and I posted should at least get you going in the right direction.

-Dave