comparison scripts/plot/__errplot__.m @ 6168:a3cd9e6fcd9c

[project @ 2006-11-15 15:36:18 by jwe]
author jwe
date Wed, 15 Nov 2006 15:36:19 +0000
parents 17f25cd588b2
children 2de853a110df
comparison
equal deleted inserted replaced
6167:d9e9c436abb0 6168:a3cd9e6fcd9c
56 nkey = numel (key); 56 nkey = numel (key);
57 57
58 nplots = size (a1, 2); 58 nplots = size (a1, 2);
59 len = size (a1, 1); 59 len = size (a1, 1);
60 for i = 1:nplots 60 for i = 1:nplots
61 fmtstr = fmt{1+mod(i-1,numel(fmt))}; 61 ifmt = fmt{1+mod(i-1,numel(fmt))};
62 if (i <= nkey) 62 if (i <= nkey)
63 __plot_key_labels__{cf}{mxi,myi}{loff} = key{i}; 63 __plot_key_labels__{cf}{mxi,myi}{loff} = key{i};
64 else 64 else
65 __plot_key_labels__{cf}{mxi,myi}{loff} = ""; 65 __plot_key_labels__{cf}{mxi,myi}{loff} = "";
66 endif 66 endif
68 case 2 68 case 2
69 tmp = [(1:len)', a1(:,i), a2(:,i)]; 69 tmp = [(1:len)', a1(:,i), a2(:,i)];
70 case 3 70 case 3
71 tmp = [a1(:,i), a2(:,i), a3(:,i)]; 71 tmp = [a1(:,i), a2(:,i), a3(:,i)];
72 case 4 72 case 4
73 if (index (fmtstr, "boxxy") || index (fmtstr, "xyerr")) 73 if (index (ifmt, "boxxy") || index (ifmt, "xyerr"))
74 tmp = [a1(:,i), a2(:,i), a3(:,i), a4(:,i)]; 74 tmp = [a1(:,i), a2(:,i), a3(:,i), a4(:,i)];
75 elseif (index (fmtstr, "xerr")) 75 elseif (index (ifmt, "xerr"))
76 tmp = [a1(:,i), a2(:,i), a1(:,i)-a3(:,i), a1(:,i)+a4(:,i)]; 76 tmp = [a1(:,i), a2(:,i), a1(:,i)-a3(:,i), a1(:,i)+a4(:,i)];
77 else 77 else
78 tmp = [a1(:,i), a2(:,i), a2(:,i)-a3(:,i), a2(:,i)+a4(:,i)]; 78 tmp = [a1(:,i), a2(:,i), a2(:,i)-a3(:,i), a2(:,i)+a4(:,i)];
79 endif 79 endif
80 case 5 80 case 5
86 a2(:,i)-a5(:,i), a2(:,i)+a6(:,i)]; 86 a2(:,i)-a5(:,i), a2(:,i)+a6(:,i)];
87 endswitch 87 endswitch
88 88
89 __plot_data__{cf}{mxi,myi}{j} = tmp; 89 __plot_data__{cf}{mxi,myi}{j} = tmp;
90 90
91 __plot_command__{cf}{mxi,myi} ... 91 __plot_command__{cf}{mxi,myi} \
92 = __build_plot_command__ (j, "", fmtstr, loff, ""); 92 = 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}",
93 93 __plot_command__{cf}{mxi,myi},
94 __plot_command_sep__, j, ifmt,
95 gnuplot_command_title, loff);
94 __plot_command_sep__ = ",\\\n"; 96 __plot_command_sep__ = ",\\\n";
95 97
96 j++; 98 j++;
97 loff++; 99 loff++;
98 100