Mercurial > hg > octave-terminal
changeset 9457:f9fb8c1a8e45
legend.m: Add an hggroup demo using bar(). Include clf() in each demo.
author | Ben Abbott <bpabbott@mac.com> |
---|---|
date | Thu, 23 Jul 2009 18:04:49 -0400 |
parents | 8a082b66c1e0 |
children | 0c7d84a65386 |
files | scripts/ChangeLog scripts/plot/legend.m |
diffstat | 2 files changed, 20 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/scripts/ChangeLog +++ b/scripts/ChangeLog @@ -1,3 +1,8 @@ +2009-07-23 Ben Abbott <bpabbott@mac.com> + + * plot/legend.m: Add an hggroup demo using bar(). Include clf() + in each demo. + 2009-07-23 John W. Eaton <jwe@octave.org> * image/imread.m: Fix test.
--- a/scripts/plot/legend.m +++ b/scripts/plot/legend.m @@ -262,7 +262,7 @@ %! legend("boxon") %!demo -%! hold ("off"); +%! clf %! x = linspace (0, 10); %! plot (x, x); %! hold ("on"); @@ -271,11 +271,25 @@ %! hold ("off"); %!demo +%! clf %! x = linspace (0, 10); %! plot (x, x, x, x.^2); %! legend ("linear"); %!demo +%! clf %! x = linspace (0, 10); %! plot (x, x, x, x.^2); %! legend ("linear", "quadratic"); + +%!demo +%! clf +%! bar (rand (2, 3)) +%! ylim ([0 1.2]) +%! legend ({"1st Bar", "2nd Bar", "3rd Bar"}) + +%!demo +%! clf +%! bar (rand (2, 3)) +%! ylim ([0 1.2]) +%! legend ("1st Bar", "2nd Bar", "3rd Bar")