Mercurial > hg > octave-nkf
changeset 6168:a3cd9e6fcd9c
[project @ 2006-11-15 15:36:18 by jwe]
author | jwe |
---|---|
date | Wed, 15 Nov 2006 15:36:19 +0000 |
parents | d9e9c436abb0 |
children | 7ee64ed645a0 |
files | scripts/ChangeLog scripts/plot/__errplot__.m scripts/plot/__plt3__.m scripts/plot/__plt__.m |
diffstat | 4 files changed, 18 insertions(+), 15 deletions(-) [+] |
line wrap: on
line diff
--- a/scripts/ChangeLog +++ b/scripts/ChangeLog @@ -2,9 +2,6 @@ * plot/bottom_title.m, plot/top_title.m: Delete. - * plot/__build_plot_command__.m: New function. - * plot/__plt__.m, plot/__plt3__.m, plot/__errplot__.m: Use it. - * image/image_viewer.m: Set default values here. * image/image.m: Not here.
--- a/scripts/plot/__errplot__.m +++ b/scripts/plot/__errplot__.m @@ -58,7 +58,7 @@ nplots = size (a1, 2); len = size (a1, 1); for i = 1:nplots - fmtstr = fmt{1+mod(i-1,numel(fmt))}; + ifmt = fmt{1+mod(i-1,numel(fmt))}; if (i <= nkey) __plot_key_labels__{cf}{mxi,myi}{loff} = key{i}; else @@ -70,9 +70,9 @@ case 3 tmp = [a1(:,i), a2(:,i), a3(:,i)]; case 4 - if (index (fmtstr, "boxxy") || index (fmtstr, "xyerr")) + if (index (ifmt, "boxxy") || index (ifmt, "xyerr")) tmp = [a1(:,i), a2(:,i), a3(:,i), a4(:,i)]; - elseif (index (fmtstr, "xerr")) + elseif (index (ifmt, "xerr")) tmp = [a1(:,i), a2(:,i), a1(:,i)-a3(:,i), a1(:,i)+a4(:,i)]; else tmp = [a1(:,i), a2(:,i), a2(:,i)-a3(:,i), a2(:,i)+a4(:,i)]; @@ -88,9 +88,11 @@ __plot_data__{cf}{mxi,myi}{j} = tmp; - __plot_command__{cf}{mxi,myi} ... - = __build_plot_command__ (j, "", fmtstr, loff, ""); - + __plot_command__{cf}{mxi,myi} \ + = sprintf ("%s%s __plot_data__{__current_figure__}{__multiplot_xi__(__current_figure__),__multiplot_yi__(__current_figure__)}{%d} %s %s __plot_key_labels__{__current_figure__}{__multiplot_xi__(__current_figure__),__multiplot_yi__(__current_figure__)}{%d}", + __plot_command__{cf}{mxi,myi}, + __plot_command_sep__, j, ifmt, + gnuplot_command_title, loff); __plot_command_sep__ = ",\\\n"; j++;
--- a/scripts/plot/__plt3__.m +++ b/scripts/plot/__plt3__.m @@ -71,12 +71,14 @@ endif __plot_command__{cf}{mxi,myi} ... - = __build_plot_command__ (j, usingstr, fmtstr, loff, withstr); - + = sprintf ("%s%s __plot_data__{__current_figure__}{__multiplot_xi__(__current_figure__),__multiplot_yi__(__current_figure__)}{%d} %s %s %s __plot_key_labels__{__current_figure__}{__multiplot_xi__(__current_figure__),__multiplot_yi__(__current_figure__)}{%d} %s", + __plot_command__{cf}{mxi,myi}, + __plot_command_sep__, j++, usingstr, fmtstr, + gnuplot_command_title, loff++, withstr); __plot_command_sep__ = ",\\\n"; - __plot_data_offset__{cf}(mxi,myi) = ++j; - __plot_line_offset__{cf}(mxi,myi) = ++loff; + __plot_data_offset__{cf}(mxi,myi) = j; + __plot_line_offset__{cf}(mxi,myi) = loff; if (__multiplot_mode__(cf)) __gnuplot_raw__ ("clear\n");
--- a/scripts/plot/__plt__.m +++ b/scripts/plot/__plt__.m @@ -106,9 +106,11 @@ for i = 1:length (__plot_data__{cf}{mxi,myi}{j}) usingstr = __make_using_clause__ (__plot_data__{cf}{mxi,myi}{j}{i}); __plot_command__{cf}{mxi,myi} ... - = __build_plot_command__ ([j, i], usingstr, fmtstr{i}, loff, ""); + = sprintf ("%s%s __plot_data__{__current_figure__}{__multiplot_xi__(__current_figure__),__multiplot_yi__(__current_figure__)}{%d}{%d} %s %s %s __plot_key_labels__{__current_figure__}{__multiplot_xi__(__current_figure__),__multiplot_yi__(__current_figure__)}{%d}", + __plot_command__{cf}{mxi,myi}, + __plot_command_sep__, j, i, usingstr, + fmtstr{i}, gnuplot_command_title, loff++); __plot_command_sep__ = ",\\\n"; - loff++; endfor j++; endif