# HG changeset patch # User Ben Abbott # Date 1297001763 18000 # Node ID 2e74073b57917b3633a51a18edcfaee9912506fa # Parent b268c9a79d096842ca8e3ed338adcb37d63b8462 legend.m: Add demo for replacing existing legend. diff -r b268c9a79d09 -r 2e74073b5791 scripts/ChangeLog --- a/scripts/ChangeLog Sat Feb 05 11:14:09 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 b268c9a79d09 -r 2e74073b5791 scripts/plot/legend.m --- a/scripts/plot/legend.m Sat Feb 05 11:14:09 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") + +