Prev: changing select values in a vector
Next: graphs
From: naser on 14 Feb 2010 09:04 I want to plot some figure in a "FOR" loop. i use "hold on" to have one figure but i want to have graphs in different colors. please guide me.
From: Dave Robinson on 14 Feb 2010 11:59 "naser " <naser.khodabakhshi(a)yahoo.com> wrote in message <hl8vsk$aqr$1(a)fred.mathworks.com>... > I want to plot some figure in a "FOR" loop. i use "hold on" to have one figure but i want to have graphs in different colors. please guide me. I think you need to use "hold all" and this will give you what you what you want. Regards Dave Robinson
From: ImageAnalyst on 14 Feb 2010 16:08 for k = 1:10 x = rand(1,10); randomColor = rand(1,3); plot(x, 'Color', randomColor, 'linewidth', 2); if k == 1 % Prevent prior plots from getting destroyed. hold on; % Maximize figure. set(gcf, 'Position', get(0,'Screensize')); end end
|
Pages: 1 Prev: changing select values in a vector Next: graphs |