changeset 13090:7f127e079a7c

codesprint: demos for semilogx, semilogy, and loglog * semilogx.m, semilogy.m, loglog.m: New demos.
author John W. Eaton <jwe@octave.org>
date Sat, 03 Sep 2011 18:46:09 -0400
parents 87015276d625
children e5aaba072d2b
files scripts/plot/loglog.m scripts/plot/semilogx.m scripts/plot/semilogy.m
diffstat 3 files changed, 24 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/scripts/plot/loglog.m
+++ b/scripts/plot/loglog.m
@@ -60,3 +60,11 @@
 
 endfunction
 
+%!demo
+%! t = 1:0.01:10;
+%! x = sort ((t .* (1 + rand (size (t)))) .^ 2);
+%! y = ((t .* (1 + rand (size (t)))) .^ 2);
+%! loglog (x, y);
+
+## Remove from test statistics.  No real tests possible.
+%!assert (1)
--- a/scripts/plot/semilogx.m
+++ b/scripts/plot/semilogx.m
@@ -59,3 +59,11 @@
   end_unwind_protect
 
 endfunction
+
+%!demo
+%! x = 1:0.01:10;
+%! y = (x .* (1 + rand (size (x)))) .^ 2;
+%! semilogx (y, x);
+
+## Remove from test statistics.  No real tests possible.
+%!assert (1)
--- a/scripts/plot/semilogy.m
+++ b/scripts/plot/semilogy.m
@@ -60,3 +60,11 @@
   end_unwind_protect
 
 endfunction
+
+%!demo
+%! x = 1:0.01:10;
+%! y = (x .* (1 + rand (size (x)))) .^ 2;
+%! semilogy (x, y);
+
+## Remove from test statistics.  No real tests possible.
+%!assert (1)