This is a static copy of a profile report

Home

legendcolorbarlayout>doBestLegendLayout (9 calls, 0.503 sec)
Generated 05-Aug-2011 13:02:42 using cpu time.
subfunction in file /usr/local/MATLAB/R2011a/toolbox/matlab/scribe/legendcolorbarlayout.m
Copy to new window for comparing multiple runs

Parents (calling functions)

Function NameFunction TypeCalls
legendcolorbarlayoutfunction9
Lines where the most time was spent

Line NumberCodeCallsTotal Time% TimeTime Plot
1159
pos = methods(handle(h),'get_b...
90.492 s97.8%
1169
set(h,'Position',pos);
90.011 s2.2%
1171
setappdata(ax,'inLayout',oldla...
90 s0%
1170
end
90 s0%
1168
setappdata(double(h),'LegendBe...
90 s0%
All other lines  0 s0%
Totals  0.503 s100% 
Children (called functions)

Function NameFunction TypeCallsTotal Time% TimeTime Plot
scribe.legend.methodsfunction90.492 s97.8%
scribe.legend.init>changedPossubfunction90 s0%
Self time (built-ins, overhead, etc.)  0.011 s2.2%
Totals  0.503 s100% 
Code Analyzer results
No Code Analyzer messages.
Coverage results
[ Show coverage for parent directory ]
Total lines in function16
Non-code lines (comments, blank lines)2
Code lines (lines that can run)14
Code lines that did run14
Code lines that did not run0
Coverage (did run/can run)100.00 %
Function listing
   time   calls  line
1156 function doBestLegendLayout(ax,h)
9 1157 oldlayout = getappdata(ax,'inLayout');
9 1158 setappdata(ax,'inLayout',true);
0.49 9 1159 pos = methods(handle(h),'get_best_location');
9 1160 if ~any(isnan(pos)) && all(pos(3:4) > 0)
9 1161 normpos = pos;
9 1162 pos = hgconvertunits(ancestor(ax,'figure'),pos,...
1163 'normalized',get(h,'Units'),get(ax,'Parent'));
9 1164 axpos = get(ax,'Position');
9 1165 fig = ancestor(ax,'figure');
9 1166 axpos = hgconvertunits(fig,axpos,get(ax,'Units'),'normalized',get(ax,'Parent'));
9 1167 bestpt = (normpos(1:2)-axpos(1:2))./axpos(3:4);
9 1168 setappdata(double(h),'LegendBestLocation',bestpt);
0.01 9 1169 set(h,'Position',pos);
9 1170 end
9 1171 setappdata(ax,'inLayout',oldlayout);

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