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	Fri Oct 26 10:46:17 2012 -0400
+++ b/scripts/plot/bar.m	Sat Oct 27 18:53:51 2012 -0700
@@ -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	Fri Oct 26 10:46:17 2012 -0400
+++ b/scripts/plot/barh.m	Sat Oct 27 18:53:51 2012 -0700
@@ -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')
+