# HG changeset patch # User Rik # Date 1351389231 25200 # Node ID de751531e548edf58de7660f9826e23d8449d097 # Parent ed6385e234208426909ea67fa5e78179d62e73e2 test: Add demos for bar.m and barh.m * bar.m, barh.m: Add %!demos. diff --git a/scripts/plot/bar.m b/scripts/plot/bar.m --- a/scripts/plot/bar.m +++ b/scripts/plot/bar.m @@ -95,5 +95,15 @@ endfunction -%% FIXME: Need demo or test for function +%!demo +%! clf; +%! y = rand (10, 1); +%! bar (y); +%!demo +%! clf; +%! h = bar (rand (5, 3)); +%! set (h(1), 'facecolor', 'r') +%! set (h(2), 'facecolor', 'g') +%! set (h(3), 'facecolor', 'b') + diff --git a/scripts/plot/barh.m b/scripts/plot/barh.m --- a/scripts/plot/barh.m +++ b/scripts/plot/barh.m @@ -54,5 +54,15 @@ endfunction -%% FIXME: Need demo or test for function +%!demo +%! clf; +%! x = rand (10, 1); +%! barh (x); +%!demo +%! clf; +%! h = barh (rand (5, 3)); +%! set (h(1), 'facecolor', 'r') +%! set (h(2), 'facecolor', 'g') +%! set (h(3), 'facecolor', 'b') +