This is a static copy of a profile report

Home

legendcolorbarlayout>doLayout (20 calls, 0.290 sec)
Generated 18-Mar-2011 23:31:46 using cpu time.
M-subfunction in file /Applications/MATLAB_R2010a.app/toolbox/matlab/scribe/legendcolorbarlayout.m
Copy to new window for comparing multiple runs

Parents (calling functions)

Function NameFunction TypeCalls
legendcolorbarlayoutM-function2
legendcolorbarlayout>doPixelBoundsCBM-subfunction4
legendcolorbarlayout>doLayoutCBM-subfunction12
legendcolorbarlayout>doParentResizeM-subfunction2
Lines where the most time was spent

Line NumberCodeCallsTotal Time% TimeTime Plot
431
doInOutLayout(par,fig,inlist,c...
200.176 s60.7%
398
if validateTextObjects(textObj...
200.031 s10.7%
430
if ~isempty(inlist)
200.021 s7.1%
416
[corner1,corner2] = getPixelBo...
200.021 s7.1%
397
localValidateLists(ax);
200.021 s7.1%
All other lines  0.021 s7.1%
Totals  0.290 s100% 
Children (called functions)

Function NameFunction TypeCallsTotal Time% TimeTime Plot
legendcolorbarlayout>doInOutLayoutM-subfunction200.176 s60.7%
legendcolorbarlayout>validateTextObjectsM-subfunction200.031 s10.7%
legendcolorbarlayout>getPixelBoundsM-subfunction200.021 s7.1%
legendcolorbarlayout>localValidateListsM-subfunction200.021 s7.1%
legendcolorbarlayout>toPointsM-subfunction400 s0%
is2DM-function200 s0%
legendcolorbarlayout>getListenersM-subfunction200 s0%
Self time (built-ins, overhead, etc.)  0.041 s14.3%
Totals  0.290 s100% 
M-Lint results
No M-Lint 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
395 function doLayout(ax,withPixBounds)
20 396 textObjects = getappdata(double(ax),'LegendColorbarText');
0.02 20 397 localValidateLists(ax);
0.03 20 398 if validateTextObjects(textObjects,ax)
20 399 if nargin == 1, withPixBounds = true; end
20 400 outlist = getappdata(ax,'LegendColorbarOuterList');
20 401 inlist = getappdata(ax,'LegendColorbarInnerList');
20 402 if ~isempty(inlist) || ~isempty(outlist)
20 403 listenerlist = getListeners(ax);
20 404 oldstate = get(listenerlist,'enable');
0.01 20 405 set(listenerlist,'enable','off')
20 406 oldlayout = getappdata(ax,'inLayout');
20 407 setappdata(ax,'inLayout',true);
408
20 409 textObjects = getappdata(ax,'LegendColorbarText');
20 410 par = get(ax,'Parent');
20 411 fig = par;
20 412 if ~strcmp(get(fig,'Type'),'figure')
413 fig = ancestor(fig,'figure');
414 end
20 415 if is2D(ax)
0.02 20 416 [corner1,corner2] = getPixelBounds(ax,textObjects,withPixBounds);
20 417 corner1 = toPoints((corner1(1:2)+corner1(3:4))/2,fig);
20 418 corner2 = toPoints((corner2(1:2)+corner2(3:4))/2,fig);
419 else
420 pixpos = getpixelposition(ax,true);
421 corner1 = toPoints(pixpos(1:2),fig);
422 corner2 = toPoints(pixpos(1:2) + pixpos(3:4),fig);
423 % flip y direction for screen orientation
424 figpos = hgconvertunits(fig,get(fig,'Position'),get(fig,'Units'),...
425 'points',0);
426 corner1(2) = figpos(4)-corner1(2);
427 corner2(2) = figpos(4)-corner2(2);
428 end
429
0.02 20 430 if ~isempty(inlist)
0.18 20 431 doInOutLayout(par,fig,inlist,corner1,corner2,true);
20 432 end
20 433 if ~isempty(outlist)
434 doInOutLayout(par,fig,outlist,corner1,corner2,false);
435 end
436
437 % cache the position for the legend pre-get listener
20 438 axPos = get(ax,'Position');
20 439 setappdata(ax,'LegendComputePosCache',axPos);
440
20 441 setappdata(ax,'inLayout',oldlayout);
20 442 set(listenerlist,{'enable'},oldstate)
20 443 end
0.01 20 444 end

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