diff doc/interpreter/splineimages.m @ 17504:8b692d9ea54e

Use Octave coding conventions for m-files which generate images for manual. * doc/interpreter/geometryimages.m, doc/interpreter/interpimages.m, doc/interpreter/sparseimages.m, doc/interpreter/splineimages.m: Use Octave coding conventions for m-files which generate images for manual.
author Rik <rik@octave.org>
date Fri, 27 Sep 2013 09:39:33 -0700
parents 333243133364
children d63878346099
line wrap: on
line diff
--- a/doc/interpreter/splineimages.m	Thu Sep 26 22:26:42 2013 -0700
+++ b/doc/interpreter/splineimages.m	Fri Sep 27 09:39:33 2013 -0700
@@ -43,10 +43,10 @@
     xx = linspace (0, 2 * pi, 400);
     y1 = ppval (pp1, xx);
     y2 = ppval (pp2, xx);
-    plot (x, y, ".", xx, [y1; y2])
-    axis tight
-    ylim ([-2.5 2.5])
-    legend ("data", "41 breaks, 40 pieces", "11 breaks, 10 pieces")
+    plot (x, y, ".", xx, [y1; y2]);
+    axis tight;
+    ylim ([-2.5 2.5]);
+    legend ("data", "41 breaks, 40 pieces", "11 breaks, 10 pieces");
     print ([nm "." typ], d_typ);
   elseif (strcmp (nm, "splinefit2")) ## Spline orders
     ## Data (200 points)
@@ -65,10 +65,10 @@
     y3 = ppval (pp3, xx);
     y4 = ppval (pp4, xx);
     y5 = ppval (pp5, xx);
-    plot (x, y, ".", xx, [y1; y2; y3; y4; y5])
-    axis tight
-    ylim ([-2.5 2.5])
-    legend ({"data", "order 0", "order 1", "order 2", "order 3", "order 4"})
+    plot (x, y, ".", xx, [y1; y2; y3; y4; y5]);
+    axis tight;
+    ylim ([-2.5 2.5]);
+    legend ({"data", "order 0", "order 1", "order 2", "order 3", "order 4"});
     print ([nm, "." typ], d_typ);
   elseif (strcmp (nm, "splinefit3"))
     ## Data (100 points)
@@ -82,10 +82,10 @@
     xx = linspace (0, 2 * pi, 400);
     y1 = ppval (pp1, xx);
     y2 = ppval (pp2, xx);
-    plot (x, y, ".", xx, [y1; y2])
-    axis tight
-    ylim ([-2 3])
-    legend ({"data", "no constraints", "periodic"})
+    plot (x, y, ".", xx, [y1; y2]);
+    axis tight;
+    ylim ([-2 3]);
+    legend ({"data", "no constraints", "periodic"});
     print ([nm "." typ], d_typ);
   elseif (strcmp (nm, "splinefit4"))
     ## Data (200 points)
@@ -105,10 +105,10 @@
     xx = linspace (0, 2 * pi, 400);
     y1 = ppval (pp1, xx);
     y2 = ppval (pp2, xx);
-    plot (x, y, ".", xx, [y1; y2])
-    axis tight
-    ylim ([-1.5 1.5])
-    legend({"data", "clamped", "hinged periodic"})
+    plot (x, y, ".", xx, [y1; y2]);
+    axis tight;
+    ylim ([-1.5 1.5]);
+    legend({"data", "clamped", "hinged periodic"});
     print ([nm "." typ], d_typ);
   elseif (strcmp (nm, "splinefit5"))
     ## Truncated data
@@ -125,11 +125,11 @@
     ## Plot
     ss = linspace (0, s(end), 400);
     xyfit = ppval (pp, ss);
-    xyb = ppval(pp, pp.breaks);
-    plot (x, y, ".", xyfit(1,:), xyfit(2,:), "r", xyb(1,:), xyb(2,:), "ro")
-    legend ({"data", "spline", "breaks"})
-    axis tight
-    ylim ([0 0.1])
+    xyb = ppval (pp, pp.breaks);
+    plot (x, y, ".", xyfit(1,:), xyfit(2,:), "r", xyb(1,:), xyb(2,:), "ro");
+    legend ({"data", "spline", "breaks"});
+    axis tight;
+    ylim ([0 0.1]);
     print ([nm "." typ], d_typ);
   elseif (strcmp (nm, "splinefit6"))
     ## Data
@@ -148,11 +148,11 @@
     y1 = ppval (pp1, xx);
     y2 = ppval (pp2, xx);
     y3 = ppval (pp3, xx);
-    plot (x, y, ".", xx, [y1; y2; y3])
-    legend({"data with outliers","robust, beta = 0.25", ...
-            "robust, beta = 0.75", "no robust fitting"})
-    axis tight
-    ylim ([-2 2])
+    plot (x, y, ".", xx, [y1; y2; y3]);
+    legend ({"data with outliers","robust, beta = 0.25", ...
+             "robust, beta = 0.75", "no robust fitting"});
+    axis tight;
+    ylim ([-2 2]);
     print ([nm "." typ], d_typ);
   endif
   hide_output ();  
@@ -185,6 +185,7 @@
   fclose (fid);
 endfunction
 
+
 %!demo
 %! for s = 1:6
 %!   splineimages (sprintf ("splinefit##d", s), "pdf")