changeset 4259:0493a367de6f

[project @ 2003-01-02 17:30:14 by jwe]
author jwe
date Thu, 02 Jan 2003 17:30:15 +0000
parents b8a4496d7b24
children 17826ec287bc
files scripts/ChangeLog scripts/plot/__errcomm__.m scripts/plot/__errplot__.m scripts/plot/__plt2mm__.m scripts/plot/__plt2mv__.m scripts/plot/__plt2ss__.m scripts/plot/__plt2vm__.m scripts/plot/__plt2vv__.m scripts/plot/axis.m
diffstat 9 files changed, 30 insertions(+), 15 deletions(-) [+]
line wrap: on
line diff
--- a/scripts/ChangeLog	Thu Jan 02 03:45:53 2003 +0000
+++ b/scripts/ChangeLog	Thu Jan 02 17:30:15 2003 +0000
@@ -1,3 +1,13 @@
+2003-01-02  John W. Eaton  <jwe@bevo.che.wisc.edu>
+
+	* plot/__plt2vv__.m: Call undo_string_escapes on fmt arg before eval.
+	* plot/__plt2vm__.m: Likewise.
+	* plot/__plt2ss__.m: Likewise.
+	* plot/__plt2mv__.m: Likewise.
+	* plot/__plt2mm__.m: Likewise.
+	* plot/__errplot__.m: Likewise.
+	* plot/__errcomm__.m: Likewise, for fmt arg passed in by user.
+
 2003-01-01  John W. Eaton  <jwe@bevo.che.wisc.edu>
 
 	* strings/strcmp.m: Handle cell arrays of strings.
--- a/scripts/plot/__errcomm__.m	Thu Jan 02 03:45:53 2003 +0000
+++ b/scripts/plot/__errcomm__.m	Thu Jan 02 17:30:15 2003 +0000
@@ -60,7 +60,7 @@
 	nargin--;
 	a = varargin{k++};
 	if (isstr (a))
-	  fmt = a;
+	  fmt = undo_string_escapes (a);
 	  cmd = "__errplot__ (arg1";
 	  for i = 2:ndata,
 	    cmd = sprintf ("%s, arg%d", cmd, i);
--- a/scripts/plot/__errplot__.m	Thu Jan 02 03:45:53 2003 +0000
+++ b/scripts/plot/__errplot__.m	Thu Jan 02 17:30:15 2003 +0000
@@ -61,7 +61,8 @@
   if (ndata == 2)
     for i = 1:nplots,
       tmp = [(1:len)', arg1(:,i), arg2(:,i)];
-      cmd = sprintf ("gplot tmp %s", fmt(min(i, rows(fmt)), :) );
+      cmd = sprintf ("gplot tmp %s",
+		     undo_string_escapes (fmt(min(i, rows(fmt)), :)));
       eval (cmd);
     endfor
   elseif (ndata == 3)
@@ -72,7 +73,8 @@
       endfor
       tstr = [tstr, "];"];
       eval (tstr);
-      cmd = sprintf ("gplot tmp %s", fmt(min(i, rows(fmt)), :) );
+      cmd = sprintf ("gplot tmp %s",
+		     undo_string_escapes (fmt(min(i, rows(fmt)), :)));
       eval (cmd);
     endfor
   elseif (ndata == 4)
@@ -85,14 +87,16 @@
        tstr = "tmp = [arg1(:,i), arg2(:,i), arg2(:,i)-arg3(:,i), arg2(:,i)+arg4(:,i)];";
       endif
       eval (tstr);
-      cmd = sprintf ("gplot tmp %s", fmt(min(i, rows(fmt)), :) );
+      cmd = sprintf ("gplot tmp %s",
+		     undo_string_escapes (fmt(min(i, rows(fmt)), :)));
       eval (cmd);
     endfor
   elseif (ndata == 6)
     for i = 1:nplots,
       tstr = "tmp = [arg1(:,i), arg2(:,i), arg1(:,i)-arg3(:,i), arg1(:,i)+arg4(:,i), arg2(:,i)-arg5(:,i), arg2(:,i)+arg6(:,i)];";
       eval (tstr);
-      cmd = sprintf ("gplot tmp %s", fmt(min(i, rows(fmt)), :) );
+      cmd = sprintf ("gplot tmp %s",
+		     undo_string_escapes (fmt(min(i, rows(fmt)), :)));
       eval (cmd);
     endfor
   else
@@ -103,7 +107,8 @@
       endfor
       tstr = [tstr, "];"];
       eval (tstr);
-      cmd = sprintf ("gplot tmp %s", fmt(min(i, rows(fmt)), :) );
+      cmd = sprintf ("gplot tmp %s",
+		     undo_string_escapes (fmt(min(i, rows(fmt)), :)));
       eval (cmd);
     endfor
   endif
--- a/scripts/plot/__plt2mm__.m	Thu Jan 02 03:45:53 2003 +0000
+++ b/scripts/plot/__plt2mm__.m	Thu Jan 02 17:30:15 2003 +0000
@@ -42,13 +42,13 @@
     if (x_nc > 0)
       tmp = [x, y];
       cmd = sprintf ("gplot tmp(:,%d:%d:%d) %s", 1, x_nc, x_nc+1,
-                     deblank (fmt (k, :)));
+                     undo_string_escapes (deblank (fmt (k, :))));
       if (k < fmt_nr)
         k++;
       endif
       for i = 2:x_nc
         cmd = sprintf ("%s, tmp(:,%d:%d:%d) %s", cmd, i, x_nc, x_nc+i,
-                       deblank (fmt (k, :)));
+                       undo_string_escapes (deblank (fmt (k, :))));
         if (k < fmt_nr)
           k++;
         endif
--- a/scripts/plot/__plt2mv__.m	Thu Jan 02 03:45:53 2003 +0000
+++ b/scripts/plot/__plt2mv__.m	Thu Jan 02 17:30:15 2003 +0000
@@ -59,13 +59,13 @@
   if (x_nc > 0)
     tmp = [x, y];
     cmd = sprintf ("gplot tmp(:,%d:%d:%d) %s", 1, x_nc, x_nc+1,
-                   deblank (fmt (k, :)));
+                   undo_string_escapes (deblank (fmt (k, :))));
     if (k < fmt_nr)
       k++;
     endif
     for i = 2:x_nc
       cmd = sprintf ("%s, tmp(:,%d:%d:%d) %s", cmd, i, x_nc-i+1, x_nc+1,
-                     deblank (fmt (k, :)));
+                     undo_string_escapes (deblank (fmt (k, :))));
       if (k < fmt_nr)
         k++;
       endif
--- a/scripts/plot/__plt2ss__.m	Thu Jan 02 03:45:53 2003 +0000
+++ b/scripts/plot/__plt2ss__.m	Thu Jan 02 17:30:15 2003 +0000
@@ -40,7 +40,7 @@
 
   if (x_nr == 1 && x_nr == y_nr && x_nc == 1 && x_nc == y_nc)
     tmp = [x, y];
-    cmd = sprintf ("gplot tmp %s", fmt);
+    cmd = sprintf ("gplot tmp %s", undo_string_escapes (fmt));
     eval (cmd);
   else
     error ("__plt2ss__: arguments must be scalars");
--- a/scripts/plot/__plt2vm__.m	Thu Jan 02 03:45:53 2003 +0000
+++ b/scripts/plot/__plt2vm__.m	Thu Jan 02 17:30:15 2003 +0000
@@ -59,13 +59,13 @@
   if (y_nc > 0)
     tmp = [x, y];
     cmd = sprintf ("gplot tmp(:,%d:%d:%d) %s", 1, x_nc, x_nc+1,
-                   deblank (fmt (k, :)));
+                   undo_string_escapes (deblank (fmt (k, :))));
     if (k < fmt_nr)
       k++;
     endif
     for i = 2:y_nc
       cmd = sprintf ("%s, tmp(:,%d:%d:%d) %s", cmd, 1, i, i+1,
-                     deblank (fmt (k, :)));
+                     undo_string_escapes (deblank (fmt (k, :))));
       if (k < fmt_nr)
         k++;
       endif
--- a/scripts/plot/__plt2vv__.m	Thu Jan 02 03:45:53 2003 +0000
+++ b/scripts/plot/__plt2vv__.m	Thu Jan 02 17:30:15 2003 +0000
@@ -57,7 +57,7 @@
   endif
 
   tmp = [x, y];
-  cmd = sprintf ("gplot tmp %s", fmt);
+  cmd = sprintf ("gplot tmp %s", undo_string_escapes (fmt));
   eval (cmd);
 
 endfunction
--- a/scripts/plot/axis.m	Thu Jan 02 03:45:53 2003 +0000
+++ b/scripts/plot/axis.m	Thu Jan 02 17:30:15 2003 +0000
@@ -229,7 +229,7 @@
       endif
 
     else
-      warning (["unknown axis option '", ax, "'"]);
+      warning ("unknown axis option '%s'", ax);
     endif
 
   elseif (isvector (ax))