diff scripts/plot/ylim.m @ 13083:0e231bbd78bc

codesprint: demos for xlim, ylim, and zlim * xlim.m, ylim.m, zlim.m: New demos. Mark as tested.
author John W. Eaton <jwe@octave.org>
date Sat, 03 Sep 2011 17:27:15 -0400
parents c792872f8942
children 5553412c6614
line wrap: on
line diff
--- a/scripts/plot/ylim.m
+++ b/scripts/plot/ylim.m
@@ -44,3 +44,34 @@
     retval = ret;
   endif
 endfunction
+
+%!demo
+%! clf ();
+%! line ();
+%! ylim ([0.2, 0.8]);
+%! title ("ylim is [0.2, 0.8]");
+%! assert (ylim (), [0.2, 0.8]);
+
+%!demo
+%! clf ();
+%! line ();
+%! ylim ('auto');
+%! title ("ylim is auto");
+%! assert (ylim ("mode"), "auto");
+
+%!demo
+%! clf ();
+%! plot3 ([0,1], [0,1], [0,1]);
+%! ylim ([0.2, 0.8]);
+%! title ("ylim is [0.2, 0.8]");
+%! assert (ylim (), [0.2, 0.8]);
+
+%!demo
+%! clf ();
+%! plot3 ([0,1], [0,1], [0,1]);
+%! ylim ('auto');
+%! title ("ylim is auto");
+%! assert (ylim ("mode"), "auto");
+
+## Remove from test statistics.  No real tests possible.
+%!assert (1)