# HG changeset patch # User jwe # Date 1041530357 0 # Node ID 17826ec287bc784dc91717481e4ec09ddb45f6b5 # Parent 0493a367de6fef308f4be069baa431ac93950d55 [project @ 2003-01-02 17:59:17 by jwe] diff --git a/scripts/ChangeLog b/scripts/ChangeLog --- a/scripts/ChangeLog +++ b/scripts/ChangeLog @@ -1,12 +1,7 @@ 2003-01-02 John W. Eaton - * 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. + * plot/__pltopt1__.m: Call undo_string_escapes for title part of + format only. 2003-01-01 John W. Eaton diff --git a/scripts/plot/__errcomm__.m b/scripts/plot/__errcomm__.m --- a/scripts/plot/__errcomm__.m +++ b/scripts/plot/__errcomm__.m @@ -60,7 +60,7 @@ nargin--; a = varargin{k++}; if (isstr (a)) - fmt = undo_string_escapes (a); + fmt = a; cmd = "__errplot__ (arg1"; for i = 2:ndata, cmd = sprintf ("%s, arg%d", cmd, i); diff --git a/scripts/plot/__errplot__.m b/scripts/plot/__errplot__.m --- a/scripts/plot/__errplot__.m +++ b/scripts/plot/__errplot__.m @@ -61,8 +61,7 @@ if (ndata == 2) for i = 1:nplots, tmp = [(1:len)', arg1(:,i), arg2(:,i)]; - cmd = sprintf ("gplot tmp %s", - undo_string_escapes (fmt(min(i, rows(fmt)), :))); + cmd = sprintf ("gplot tmp %s", fmt(min(i, rows(fmt)), :)); eval (cmd); endfor elseif (ndata == 3) @@ -73,8 +72,7 @@ endfor tstr = [tstr, "];"]; eval (tstr); - cmd = sprintf ("gplot tmp %s", - undo_string_escapes (fmt(min(i, rows(fmt)), :))); + cmd = sprintf ("gplot tmp %s", fmt(min(i, rows(fmt)), :)); eval (cmd); endfor elseif (ndata == 4) @@ -87,16 +85,14 @@ tstr = "tmp = [arg1(:,i), arg2(:,i), arg2(:,i)-arg3(:,i), arg2(:,i)+arg4(:,i)];"; endif eval (tstr); - cmd = sprintf ("gplot tmp %s", - undo_string_escapes (fmt(min(i, rows(fmt)), :))); + cmd = sprintf ("gplot tmp %s", 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", - undo_string_escapes (fmt(min(i, rows(fmt)), :))); + cmd = sprintf ("gplot tmp %s", fmt(min(i, rows(fmt)), :)); eval (cmd); endfor else @@ -107,8 +103,7 @@ endfor tstr = [tstr, "];"]; eval (tstr); - cmd = sprintf ("gplot tmp %s", - undo_string_escapes (fmt(min(i, rows(fmt)), :))); + cmd = sprintf ("gplot tmp %s", fmt(min(i, rows(fmt)), :)); eval (cmd); endfor endif diff --git a/scripts/plot/__plt2mm__.m b/scripts/plot/__plt2mm__.m --- a/scripts/plot/__plt2mm__.m +++ b/scripts/plot/__plt2mm__.m @@ -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, - undo_string_escapes (deblank (fmt (k, :)))); + 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, - undo_string_escapes (deblank (fmt (k, :)))); + deblank (fmt (k, :))); if (k < fmt_nr) k++; endif diff --git a/scripts/plot/__plt2mv__.m b/scripts/plot/__plt2mv__.m --- a/scripts/plot/__plt2mv__.m +++ b/scripts/plot/__plt2mv__.m @@ -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, - undo_string_escapes (deblank (fmt (k, :)))); + 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, - undo_string_escapes (deblank (fmt (k, :)))); + deblank (fmt (k, :))); if (k < fmt_nr) k++; endif diff --git a/scripts/plot/__plt2ss__.m b/scripts/plot/__plt2ss__.m --- a/scripts/plot/__plt2ss__.m +++ b/scripts/plot/__plt2ss__.m @@ -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", undo_string_escapes (fmt)); + cmd = sprintf ("gplot tmp %s", fmt); eval (cmd); else error ("__plt2ss__: arguments must be scalars"); diff --git a/scripts/plot/__plt2vm__.m b/scripts/plot/__plt2vm__.m --- a/scripts/plot/__plt2vm__.m +++ b/scripts/plot/__plt2vm__.m @@ -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, - undo_string_escapes (deblank (fmt (k, :)))); + 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, - undo_string_escapes (deblank (fmt (k, :)))); + deblank (fmt (k, :))); if (k < fmt_nr) k++; endif diff --git a/scripts/plot/__plt2vv__.m b/scripts/plot/__plt2vv__.m --- a/scripts/plot/__plt2vv__.m +++ b/scripts/plot/__plt2vv__.m @@ -57,7 +57,7 @@ endif tmp = [x, y]; - cmd = sprintf ("gplot tmp %s", undo_string_escapes (fmt)); + cmd = sprintf ("gplot tmp %s", fmt); eval (cmd); endfunction diff --git a/scripts/plot/__pltopt1__.m b/scripts/plot/__pltopt1__.m --- a/scripts/plot/__pltopt1__.m +++ b/scripts/plot/__pltopt1__.m @@ -182,6 +182,7 @@ endif endif endwhile + key_title = undo_string_escapes (key_title); elseif (strcmp (char, " ")) elseif (isempty(char)) ## whitespace -- do nothing.