Mercurial > octave-nkf
diff scripts/plot/__next_line_color__.m @ 10770:84c35a483d1f
Support 'hold all' (Feature Request #30336)
author | David Bateman <dbateman@free.fr> |
---|---|
date | Wed, 07 Jul 2010 20:21:28 +0200 |
parents | 95c3e38098bf |
children | fd0a3ac60b0e |
line wrap: on
line diff
--- a/scripts/plot/__next_line_color__.m Wed Jul 07 11:03:30 2010 +0200 +++ b/scripts/plot/__next_line_color__.m Wed Jul 07 20:21:28 2010 +0200 @@ -32,10 +32,12 @@ persistent color_index; if (nargin < 2) - if (nargin == 1 && reset) - color_rotation = get (gca (), "colororder"); - num_colors = rows (color_rotation); - color_index = 1; + if (nargin == 1) + if (reset || isempty (color_rotation)) + color_rotation = get (gca (), "colororder"); + num_colors = rows (color_rotation); + color_index = 1; + endif elseif (! isempty (color_rotation)) rgb = color_rotation(color_index,:); if (++color_index > num_colors)