# HG changeset patch # User Ben Abbott # Date 1294499318 18000 # Node ID aed2c50c308244d297643e70463307a9e337ed90 # Parent 2b8531a6a3c920ab709301c07623aaf3295ce000 legend.m: legend with more than two inline keys (bug 31991). Add/modifyy demos. diff -r 2b8531a6a3c9 -r aed2c50c3082 scripts/ChangeLog --- a/scripts/ChangeLog Sat Jan 08 11:53:51 2011 +0100 +++ b/scripts/ChangeLog Sat Jan 08 10:08:38 2011 -0500 @@ -1,3 +1,8 @@ +2011-01-08 John Hunt + + * plot/legend.m, plot/private/__plt__.m: legend with more than two + inline keys (bug 31991). Add/modifyy demos. + 2011-01-07 John W. Eaton * general/private/__isequal__.m: Compare objects as if they are diff -r 2b8531a6a3c9 -r aed2c50c3082 scripts/plot/legend.m --- a/scripts/plot/legend.m Sat Jan 08 11:53:51 2011 +0100 +++ b/scripts/plot/legend.m Sat Jan 08 10:08:38 2011 -0500 @@ -989,7 +989,13 @@ %!demo %! clf %! x = 0:1; +%! plot (x, x, ";I am Blue;", x, 2*x, ";I am Green;", x, 3*x, ";I am Red;") + +%!demo +%! clf +%! x = 0:1; %! plot (x, x, ";I am Blue;", x, 2*x, x, 3*x, ";I am Red;") +%! title ("Blue and Green keys, with Green mising") %!demo %! clf diff -r 2b8531a6a3c9 -r aed2c50c3082 scripts/plot/private/__plt__.m --- a/scripts/plot/private/__plt__.m Sat Jan 08 11:53:51 2011 +0100 +++ b/scripts/plot/private/__plt__.m Sat Jan 08 10:08:38 2011 -0500 @@ -132,7 +132,7 @@ for i = 1 : n key = options.key; if (! isempty (key)) - hlgnd = [hlgnd(:), h(i)]; + hlgnd = [hlgnd(:); h(i)]; tlgnd = {tlgnd{:}, key}; endif endfor