changeset 28621:174dc4519e73

maint: merge stable to default.
author Rik <rik@octave.org>
date Fri, 14 Aug 2020 14:15:50 -0700
parents cd7bbca7eae3 (current diff) 45a9dcee45db (diff)
children 7bdd127d77e5
files
diffstat 5 files changed, 33 insertions(+), 13 deletions(-) [+]
line wrap: on
line diff
--- a/doc/interpreter/geometryimages.m	Fri Aug 14 00:50:03 2020 -0400
+++ b/doc/interpreter/geometryimages.m	Fri Aug 14 14:15:50 2020 -0700
@@ -24,6 +24,12 @@
 ########################################################################
 
 function geometryimages (d, nm, typ)
+
+  if (strcmp (typ, "txt"))
+    image_as_txt (d, nm);
+    return;
+  endif
+
   set_graphics_toolkit ();
   set_print_size ();
   hide_output ();
@@ -41,8 +47,6 @@
       && any (strcmp (nm, {"voronoi", "griddata", "convhull", "delaunay", ...
                            "triplot"})))
     sombreroimage (outfile, typ, d_typ);
-  elseif (strcmp (typ, "txt"))
-    image_as_txt (d, nm);
   elseif (strcmp (nm, "voronoi"))
     rand ("state", 9);
     x = rand (10, 1);
--- a/doc/interpreter/interpimages.m	Fri Aug 14 00:50:03 2020 -0400
+++ b/doc/interpreter/interpimages.m	Fri Aug 14 14:15:50 2020 -0700
@@ -24,6 +24,12 @@
 ########################################################################
 
 function interpimages (d, nm, typ)
+
+  if (strcmp (typ, "txt"))
+    image_as_txt (d, nm);
+    return;
+  endif
+
   set_graphics_toolkit ();
   set_print_size ();
   hide_output ();
@@ -37,9 +43,7 @@
     d_typ = ["-d", typ];
   endif
 
-  if (strcmp (typ, "txt"))
-    image_as_txt (d, nm);
-  elseif (strcmp (nm, "interpft"))
+  if (strcmp (nm, "interpft"))
     t = 0 : 0.3 : pi; dt = t(2)-t(1);
     n = length (t); k = 100;
     ti = t(1) + [0 : k-1]*dt*n/k;
--- a/doc/interpreter/plotimages.m	Fri Aug 14 00:50:03 2020 -0400
+++ b/doc/interpreter/plotimages.m	Fri Aug 14 14:15:50 2020 -0700
@@ -24,6 +24,12 @@
 ########################################################################
 
 function plotimages (d, nm, typ)
+
+  if (strcmp (typ , "txt"))
+    image_as_txt (d, nm);
+    return;
+  endif
+
   set_graphics_toolkit ();
   set_print_size ();
   hide_output ();
@@ -37,9 +43,7 @@
     d_typ = ["-d", typ];
   endif
 
-  if (strcmp (typ , "txt"))
-    image_as_txt (d, nm);
-  elseif (strcmp (nm, "plot"))
+  if (strcmp (nm, "plot"))
     x = -10:0.1:10;
     plot (x, sin (x));
     xlabel ("x");
--- a/doc/interpreter/sparseimages.m	Fri Aug 14 00:50:03 2020 -0400
+++ b/doc/interpreter/sparseimages.m	Fri Aug 14 14:15:50 2020 -0700
@@ -24,6 +24,12 @@
 ########################################################################
 
 function sparseimages (d, nm, typ)
+
+  if (strcmp (typ, "txt"))
+    txtimages (d, nm, 15, typ);
+    return;
+  endif
+
   set_graphics_toolkit ();
   set_print_size ();
   hide_output ();
@@ -43,8 +49,6 @@
     ## There is no sparse matrix implementation available because
     ## of missing libraries, plot sombreros instead.
     sombreroimage (outfile, typ, d_typ);
-  elseif (strcmp (typ, "txt"))
-    txtimages (d, nm, 15, typ);
   elseif (strcmp (nm, "gplot"))
     A = sparse ([2,6,1,3,2,4,3,5,4,6,1,5],
                 [1,1,2,2,3,3,4,4,5,5,6,6], 1, 6, 6);
--- a/doc/interpreter/splineimages.m	Fri Aug 14 00:50:03 2020 -0400
+++ b/doc/interpreter/splineimages.m	Fri Aug 14 14:15:50 2020 -0700
@@ -24,6 +24,12 @@
 ########################################################################
 
 function splineimages (d, nm, typ)
+
+  if (strcmp (typ, "txt"))
+    image_as_txt (d, nm);
+    return;
+  endif
+
   set_graphics_toolkit ();
   set_print_size ();
   hide_output ();
@@ -37,9 +43,7 @@
     d_typ = ["-d" typ];
   endif
 
-  if (strcmp (typ, "txt"))
-    image_as_txt (d, nm);
-  elseif (strcmp (nm, "splinefit1")) ## Breaks and Pieces
+  if (strcmp (nm, "splinefit1")) ## Breaks and Pieces
     rand ("state", 1);
     randn ("state", 1);
     x = 2 * pi * rand (1, 200);