Mercurial > hg > octave-shane
changeset 15565:de751531e548
test: Add demos for bar.m and barh.m
* bar.m, barh.m: Add %!demos.
author | Rik <rik@octave.org> |
---|---|
date | Sat, 27 Oct 2012 18:53:51 -0700 |
parents | ed6385e23420 |
children | ab1c6e6d1be6 79083c78eac9 |
files | scripts/plot/bar.m scripts/plot/barh.m |
diffstat | 2 files changed, 22 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- 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') +
--- 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') +