# HG changeset patch # User Ben Abbott # Date 1297001763 18000 # Node ID 5fb6ea1bff6555d51e8ff34a53f67835fc17652c # Parent ca1190196d26368edf7308d7df30b8faae08fcaf legend.m: Add demo for replacing existing legend. diff --git a/scripts/ChangeLog b/scripts/ChangeLog --- a/scripts/ChangeLog +++ b/scripts/ChangeLog @@ -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 --git a/scripts/plot/legend.m b/scripts/plot/legend.m --- a/scripts/plot/legend.m +++ b/scripts/plot/legend.m @@ -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") + +