# HG changeset patch # User jwe # Date 1163604979 0 # Node ID a3cd9e6fcd9ce0157f3769fe97cc5d7748b7495f # Parent d9e9c436abb0214cc195a0a1ff748fe695ace9d9 [project @ 2006-11-15 15:36:18 by jwe] diff -r d9e9c436abb0 -r a3cd9e6fcd9c scripts/ChangeLog --- a/scripts/ChangeLog Wed Nov 15 15:22:46 2006 +0000 +++ b/scripts/ChangeLog Wed Nov 15 15:36:19 2006 +0000 @@ -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. diff -r d9e9c436abb0 -r a3cd9e6fcd9c scripts/plot/__errplot__.m --- a/scripts/plot/__errplot__.m Wed Nov 15 15:22:46 2006 +0000 +++ b/scripts/plot/__errplot__.m Wed Nov 15 15:36:19 2006 +0000 @@ -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++; diff -r d9e9c436abb0 -r a3cd9e6fcd9c scripts/plot/__plt3__.m --- a/scripts/plot/__plt3__.m Wed Nov 15 15:22:46 2006 +0000 +++ b/scripts/plot/__plt3__.m Wed Nov 15 15:36:19 2006 +0000 @@ -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"); diff -r d9e9c436abb0 -r a3cd9e6fcd9c scripts/plot/__plt__.m --- a/scripts/plot/__plt__.m Wed Nov 15 15:22:46 2006 +0000 +++ b/scripts/plot/__plt__.m Wed Nov 15 15:36:19 2006 +0000 @@ -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