# HG changeset patch # User Ben Abbott # Date 1297001763 18000 # Node ID 5fb6ea1bff6555d51e8ff34a53f67835fc17652c # Parent ca1190196d26368edf7308d7df30b8faae08fcaf legend.m: Add demo for replacing existing legend. diff -r ca1190196d26 -r 5fb6ea1bff65 scripts/ChangeLog --- a/scripts/ChangeLog Sun Feb 06 05:50:49 2011 -0500 +++ b/scripts/ChangeLog Sun Feb 06 09:16:03 2011 -0500 @@ -1,3 +1,7 @@ +2011-02-06 Ben Abbott + + * plot/legend.m: Add demo for replacing existing legend. + 2011-02-06 John W. Eaton * general/circshift.m: New tests. diff -r ca1190196d26 -r 5fb6ea1bff65 scripts/plot/legend.m --- a/scripts/plot/legend.m Sun Feb 06 05:50:49 2011 -0500 +++ b/scripts/plot/legend.m Sun Feb 06 09:16:03 2011 -0500 @@ -1079,3 +1079,13 @@ %! plot (x, cos(x), ";cos(x);") %! hold off +%!demo +%! clf +%! x = 0:0.1:10; +%! plot (x, sin(x), ";sin(x);") +%! hold all +%! plot (x, cos(x), ";cos(x);") +%! hold off +%! legend ({"sin(x)", "cos(x)"}, "location", "northeastoutside") + +