Mercurial > hg > octave-nkf
diff scripts/plot/legend.m @ 12437:a754c2d8a13f
Modify demo scripts to allow conventient conversion to Matlab compatible syntax.
author | Ben Abbott <bpabbott@mac.com> |
---|---|
date | Thu, 10 Feb 2011 18:48:36 -0500 |
parents | 735e43b75e45 |
children | 2ed62b9f949e |
line wrap: on
line diff
--- a/scripts/plot/legend.m +++ b/scripts/plot/legend.m @@ -1041,9 +1041,10 @@ %!demo %! clf %! labels = {}; +%! colororder = get (gca, "colororder"); %! for i = 1:5 %! h = plot(1:100, i + rand(100,1)); hold on; -%! set (h, "color", get (gca, "colororder")(i,:)) +%! set (h, "color", colororder(i,:)) %! labels = {labels{:}, cstrcat("Signal ", num2str(i))}; %! endfor %! hold off; @@ -1055,9 +1056,10 @@ %!demo %! clf %! labels = {}; +%! colororder = get (gca, "colororder"); %! for i = 1:5 %! h = plot(1:100, i + rand(100,1)); hold on; -%! set (h, "color", get (gca, "colororder")(i,:)) +%! set (h, "color", colororder(i,:)) %! labels = {labels{:}, cstrcat("Signal ", num2str(i))}; %! endfor %! hold off;