Mercurial > hg > octave-lojdl
changeset 12392:2e74073b5791 release-3-4-x
legend.m: Add demo for replacing existing legend.
author | Ben Abbott <bpabbott@mac.com> |
---|---|
date | Sun, 06 Feb 2011 09:16:03 -0500 |
parents | b268c9a79d09 |
children | f16a5244d93a |
files | scripts/ChangeLog scripts/plot/legend.m |
diffstat | 2 files changed, 14 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/scripts/ChangeLog +++ b/scripts/ChangeLog @@ -1,3 +1,7 @@ +2011-02-06 Ben Abbott <bpabbott@mac.com> + + * plot/legend.m: Add demo for replacing existing legend. + 2011-02-06 John W. Eaton <jwe@octave.org> * general/circshift.m: New tests.
--- 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") + +