This is a static copy of a profile report

Home

legendcolorbarlayout>doLayout (171 calls, 1.016 sec)
Generated 05-Aug-2011 13:02:40 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
legendcolorbarlayoutfunction20
legendcolorbarlayout>doLayoutCBsubfunction82
legendcolorbarlayout>doParentResizesubfunction41
legendcolorbarlayout>doPixelBoundsCBsubfunction28
Lines where the most time was spent

Line NumberCodeCallsTotal Time% TimeTime Plot
438
doInOutLayout(par,fig,inlist,c...
1650.459 s45.2%
423
[corner1,corner2] = getPixelBo...
1650.350 s34.4%
405
if validateTextObjects(textObj...
1710.055 s5.4%
404
localValidateLists(ax);
1710.044 s4.3%
425
corner2 = toPoints((corner2(1:...
1650.022 s2.2%
All other lines  0.087 s8.6%
Totals  1.016 s100% 
Children (called functions)

Function NameFunction TypeCallsTotal Time% TimeTime Plot
legendcolorbarlayout>doInOutLayoutsubfunction1650.459 s45.2%
legendcolorbarlayout>getPixelBoundssubfunction1650.350 s34.4%
legendcolorbarlayout>validateTextObjectssubfunction1710.055 s5.4%
legendcolorbarlayout>localValidateListssubfunction1710.044 s4.3%
is2Dfunction1650.011 s1.1%
legendcolorbarlayout>getListenerssubfunction1650.011 s1.1%
legendcolorbarlayout>toPointssubfunction3300 s0%
Self time (built-ins, overhead, etc.)  0.087 s8.6%
Totals  1.016 s100% 
Code Analyzer results
No Code Analyzer messages.
Coverage results
[ Show coverage for parent directory ]
Total lines in function50
Non-code lines (comments, blank lines)8
Code lines (lines that can run)42
Code lines that did run30
Code lines that did not run12
Coverage (did run/can run)71.43 %
Function listing
   time   calls  line
402 function doLayout(ax,withPixBounds)
0.01 171 403 textObjects = getappdata(double(ax),'LegendColorbarText');
0.04 171 404 localValidateLists(ax);
0.05 171 405 if validateTextObjects(textObjects,ax)
171 406 if nargin == 1, withPixBounds = true; end
171 407 outlist = getappdata(ax,'LegendColorbarOuterList');
171 408 inlist = getappdata(ax,'LegendColorbarInnerList');
171 409 if ~isempty(inlist) || ~isempty(outlist)
0.01 165 410 listenerlist = getListeners(ax);
165 411 oldstate = get(listenerlist,'enable');
165 412 set(listenerlist,'enable','off')
0.01 165 413 oldlayout = getappdata(ax,'inLayout');
165 414 setappdata(ax,'inLayout',true);
415
165 416 textObjects = getappdata(ax,'LegendColorbarText');
0.01 165 417 par = get(ax,'Parent');
165 418 fig = par;
165 419 if ~strcmp(get(fig,'Type'),'figure')
420 fig = ancestor(fig,'figure');
421 end
0.02 165 422 if is2D(ax)
0.35 165 423 [corner1,corner2] = getPixelBounds(ax,textObjects,withPixBounds);
165 424 corner1 = toPoints((corner1(1:2)+corner1(3:4))/2,fig);
0.02 165 425 corner2 = toPoints((corner2(1:2)+corner2(3:4))/2,fig);
426 else
427 pixpos = getpixelposition(ax,true);
428 corner1 = toPoints(pixpos(1:2),fig);
429 corner2 = toPoints(pixpos(1:2) + pixpos(3:4),fig);
430 % flip y direction for screen orientation
431 figpos = hgconvertunits(fig,get(fig,'Position'),get(fig,'Units'),...
432 'points',0);
433 corner1(2) = figpos(4)-corner1(2);
434 corner2(2) = figpos(4)-corner2(2);
435 end
436
165 437 if ~isempty(inlist)
0.46 165 438 doInOutLayout(par,fig,inlist,corner1,corner2,true);
165 439 end
165 440 if ~isempty(outlist)
441 doInOutLayout(par,fig,outlist,corner1,corner2,false);
442 end
443
444 % cache the position for the legend pre-get listener
165 445 axPos = get(ax,'Position');
165 446 setappdata(ax,'LegendComputePosCache',axPos);
447
0.01 165 448 setappdata(ax,'inLayout',oldlayout);
165 449 set(listenerlist,{'enable'},oldstate)
165 450 end
171 451 end

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