This is a static copy of a profile report

Home

genfig>plotfeat (48 calls, 2.055 sec)
Generated 05-Aug-2011 13:03:28 using cpu time.
subfunction in file /home/LeechJ/cbass_analysis/reduc/plotting/genfig.m
Copy to new window for comparing multiple runs

Parents (calling functions)

Function NameFunction TypeCalls
genfigfunction48
Lines where the most time was spent

Line NumberCodeCallsTotal Time% TimeTime Plot
142
eval(txt1); eval(txt2);
5760.874 s42.6%
147
eval(txtPlot);
1980.437 s21.3%
121
h = plot(x{1,pageNum}, x{2,pag...
240.328 s16.0%
165
plotdescription(txt,plotNum,pa...
480.186 s9.0%
148
hold on;
1980.077 s3.7%
All other lines  0.153 s7.4%
Totals  2.055 s100% 
Children (called functions)

Function NameFunction TypeCallsTotal Time% TimeTime Plot
newplotfunction2220.383 s18.6%
genfig>plotdescriptionsubfunction480.186 s9.0%
holdfunction2700.109 s5.3%
lineseriesfunction2220.044 s2.1%
genfig>manaxissubfunction480.011 s0.5%
genfig>getcolorsubfunction480 s0%
Self time (built-ins, overhead, etc.)  1.323 s64.4%
Totals  2.055 s100% 
Code Analyzer results
Line numberMessage
109Input argument 'allflags' might be unused, although a later one is used. Consider replacing it by ~.
115The value assigned here to 'clr' appears to be unused. Consider replacing it by ~.
145The variable 'a' might be used before it is defined.
149The variable 'leg' appears to change size on every loop iteration. Consider preallocating for speed.
Coverage results
[ Show coverage for parent directory ]
Total lines in function61
Non-code lines (comments, blank lines)21
Code lines (lines that can run)40
Code lines that did run34
Code lines that did not run6
Coverage (did run/can run)85.00 %
Function listing
   time   calls  line
109 function [h, leg] = plotfeat(x,allflags,ax,pageNum,plotNum,txt,num,matrix,swap, type)
110
111 % get the features to plot
112 % we only have {source, calibrator, abscal, blank, skydip, noise_event, and noise}
113
114 % get the color and legend
48 115 [clr, legall] = getcolor(type);
116
117 % we only need to plot the ones with legall
48 118 switch type
48 119 case 'allflags'
120 % first we just plot the data
0.33 24 121 h = plot(x{1,pageNum}, x{2,pageNum}(:,plotNum), 'k.'); hold on
24 122 index = 2;
24 123 leg{1} = 'data';
124
24 125 case 'feature'
24 126 index = 1;
24 127 leg = [];
24 128 h = [];
24 129 end
130
48 131 for m=1:length(legall)
576 132 switch type
576 133 case 'allflags'
0.02 408 134 txt1 = sprintf('a = x{1,pageNum}(x{3,pageNum}.%s(:,plotNum));', legall{m});
408 135 txt2 = sprintf('b = x{2,pageNum}(x{3,pageNum}.%s(:,plotNum), plotNum);', legall{m});
136
168 137 case 'feature'
168 138 txt1 = sprintf('a = x{1,pageNum}(x{3,pageNum}.%s);', legall{m});
168 139 txt2 = sprintf('b = x{2,pageNum}(x{3,pageNum}.%s, plotNum);', legall{m});
168 140 end
141
0.87 576 142 eval(txt1); eval(txt2);
143
144 % do not plot if there are no data points to plot
0.07 576 145 if(sum(a)>0)
0.01 198 146 txtPlot = sprintf('h = plot(a, b, ''.'', ''markerfacecolor'', clr(m,:), ''markeredgecolor'', clr(m,:), ''MarkerSize'',10);');
0.44 198 147 eval(txtPlot);
0.08 198 148 hold on;
198 149 leg{index} = legall{m};
198 150 index = index+1;
198 151 end
576 152 end
153
48 154 if(isempty(h))
155 % no data to plot in this section
156 a = x{1,pageNum};
157 b = zeros(size(a));
158 h = plot(a,b,'w');
159 text(a(1), b(1), 'DATA HAS NO INTENT', 'FontSize', 18);
160 text(a(1), -0.25, 'FOR THIS TIME PERIOD', 'FontSize', 18);
161 end
162
163
0.02 48 164 manaxis(ax,x{2,pageNum}(:,plotNum))
0.19 48 165 plotdescription(txt,plotNum,pageNum,num,matrix,swap);
166
0.02 48 167 hold off
168
0.01 48 169 return;

Other subfunctions in this file are not included in this listing.