Mercurial > hg > octave-nkf
comparison scripts/plot/__errplot__.m @ 5493:b2e882e8b68b
[project @ 2005-10-13 17:51:19 by jwe]
author | jwe |
---|---|
date | Thu, 13 Oct 2005 17:51:19 +0000 |
parents | c49aec8a9080 |
children | 2618a0750ae6 |
comparison
equal
deleted
inserted
replaced
5492:179096e8e57f | 5493:b2e882e8b68b |
---|---|
36 | 36 |
37 function __errplot__ (fstr, a1, a2, a3, a4, a5, a6) | 37 function __errplot__ (fstr, a1, a2, a3, a4, a5, a6) |
38 | 38 |
39 __plot_globals__; | 39 __plot_globals__; |
40 | 40 |
41 __setup_plot__; | |
42 | |
41 if (nargin < 3 || nargin > 7) # at least three data arguments needed | 43 if (nargin < 3 || nargin > 7) # at least three data arguments needed |
42 usage ("__errplot__ (fmt, arg1, ...)"); | 44 usage ("__errplot__ (fmt, arg1, ...)"); |
43 endif | 45 endif |
44 | 46 |
45 j = __plot_data_offset__(__current_figure__); | 47 j = __plot_data_offset__{__current_figure__}(__multiplot_xi__,__multiplot_yi__); |
46 | 48 |
47 fmt = __pltopt__ ("__errplot__", fstr); | 49 fmt = __pltopt__ ("__errplot__", fstr); |
48 | 50 |
49 nplots = size (a1, 2); | 51 nplots = size (a1, 2); |
50 len = size (a1, 1); | 52 len = size (a1, 1); |
70 tmp = [a1(:,i), a2(:,i), ... | 72 tmp = [a1(:,i), a2(:,i), ... |
71 a1(:,i)-a3(:,i), a1(:,i)+a4(:,i), ... | 73 a1(:,i)-a3(:,i), a1(:,i)+a4(:,i), ... |
72 a2(:,i)-a5(:,i), a2(:,i)+a6(:,i)]; | 74 a2(:,i)-a5(:,i), a2(:,i)+a6(:,i)]; |
73 endswitch | 75 endswitch |
74 | 76 |
75 __plot_data__{__current_figure__}{j} = tmp; | 77 __plot_data__{__current_figure__}{__multiplot_xi__,__multiplot_yi__}{j} = tmp; |
76 | 78 |
77 __plot_command__{__current_figure__} \ | 79 __plot_command__{__current_figure__}{__multiplot_xi__,__multiplot_yi__} \ |
78 = sprintf ("%s%s __plot_data__{__current_figure__}{%d} %s", | 80 = sprintf ("%s%s __plot_data__{__current_figure__}{__multiplot_xi__,__multiplot_yi__}{%d} %s", |
79 __plot_command__{__current_figure__}, | 81 __plot_command__{__current_figure__}{__multiplot_xi__,__multiplot_yi__}, |
80 __plot_command_sep__, j, ifmt); | 82 __plot_command_sep__, j, ifmt); |
81 __plot_command_sep__ = ",\\\n"; | 83 __plot_command_sep__ = ",\\\n"; |
82 | 84 |
83 j++; | 85 j++; |
84 | 86 |
85 endfor | 87 endfor |
86 | 88 |
87 __plot_data_offset__(__current_figure__) = j; | 89 __plot_data_offset__{__current_figure__}(__multiplot_xi__,__multiplot_yi__) = j; |
88 | 90 |
89 if (! isempty (__plot_command__{__current_figure__})) | 91 if (! isempty (__plot_command__{__current_figure__}{__multiplot_xi__,__multiplot_yi__})) |
90 eval (__plot_command__{__current_figure__}); | 92 if (__multiplot_mode__) |
93 __gnuplot_raw__ ("clear\n"); | |
94 endif | |
95 eval (__plot_command__{__current_figure__}{__multiplot_xi__,__multiplot_yi__}); | |
91 endif | 96 endif |
92 | 97 |
93 endfunction | 98 endfunction |