This is a static copy of a profile report

Home

scribe.legend.init>setWidthHeight (43 calls, 0.066 sec)
Generated 05-Aug-2011 13:02:21 using cpu time.
subfunction in file /usr/local/MATLAB/R2011a/toolbox/matlab/scribe/@scribe/@legend/init.m
Copy to new window for comparing multiple runs

Parents (calling functions)

Function NameFunction TypeCalls
scribe.legend.initfunction14
hardcopyfunction28
subplotfunction1
Lines where the most time was spent

Line NumberCodeCallsTotal Time% TimeTime Plot
264
siz = max(methods(h,'getsize')...
270.044 s66.7%
279
setappdata(double(h),'LegendOl...
270.011 s16.7%
273
set(h,'Position',pos);
180.011 s16.7%
280
end
270 s0%
278
siz = hgconvertunits(fig,pos,g...
270 s0%
All other lines  0 s0%
Totals  0.066 s100% 
Children (called functions)

Function NameFunction TypeCallsTotal Time% TimeTime Plot
scribe.legend.methodsfunction270.044 s66.7%
opaque.doublefunction810.011 s16.7%
scribe.legend.init>computePossubfunction270 s0%
Self time (built-ins, overhead, etc.)  0.011 s16.7%
Totals  0.066 s100% 
Code Analyzer results
Line numberMessage
Coverage results
[ Show coverage for parent directory ]
Total lines in function34
Non-code lines (comments, blank lines)2
Code lines (lines that can run)32
Code lines that did run30
Code lines that did not run2
Coverage (did run/can run)93.75 %
Function listing
   time   calls  line
247 function setWidthHeight(hSrc,eventData,h) %#ok
43 248 if ishandle(h) && strcmp(get(h,'Units'),'normalized') && ...
249 any(strcmp(get(h,'Location'),{'none','Best'}))
27 250 if ~isempty(h.Axes) && ~isempty(getappdata(double(h.Axes),'inLayout')), return; end
27 251 pos = get(h,'Position');
27 252 oldsize = getappdata(double(h),'LegendOldSize');
27 253 parent = get(h,'Parent');
27 254 fig = parent;
27 255 if ~strcmp(get(fig,'Type'),'figure')
256 fig = ancestor(fig,'figure');
257 end
27 258 if isempty(oldsize)
9 259 oldsize = pos(3:4);
18 260 else
18 261 oldsize = hgconvertunits(fig,[0 0 oldsize],'points',get(h,'Units'),parent);
18 262 oldsize = oldsize(3:4);
18 263 end
0.04 27 264 siz = max(methods(h,'getsize'),oldsize);
27 265 if any(abs(siz-pos(3:4)) > 1e-10)
18 266 center = pos(1:2)+pos(3:4)/2;
18 267 pos = [center-siz/2 siz];
18 268 listen = h.PropertyListeners;
18 269 if ~isempty(listen)
18 270 oldstate = get(listen,'enable');
18 271 set(listen,'enable','off');
18 272 end
0.01 18 273 set(h,'Position',pos);
18 274 if ~isempty(listen)
18 275 set(listen,{'enable'},oldstate);
18 276 end
18 277 end
27 278 siz = hgconvertunits(fig,pos,get(h,'Units'),'points',parent);
0.01 27 279 setappdata(double(h),'LegendOldSize',siz(3:4));
27 280 end

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