# HG changeset patch # User Ben Abbott # Date 1248386689 14400 # Node ID f9fb8c1a8e45add106efab5da93857154863c996 # Parent 8a082b66c1e0f3ef6a92f45098d971415771988d legend.m: Add an hggroup demo using bar(). Include clf() in each demo. diff --git a/scripts/ChangeLog b/scripts/ChangeLog --- a/scripts/ChangeLog +++ b/scripts/ChangeLog @@ -1,3 +1,8 @@ +2009-07-23 Ben Abbott + + * plot/legend.m: Add an hggroup demo using bar(). Include clf() + in each demo. + 2009-07-23 John W. Eaton * image/imread.m: Fix test. diff --git a/scripts/plot/legend.m b/scripts/plot/legend.m --- 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")