This is a static copy of a profile report

Home

legendcolorbarlayout>getPixelBounds (165 calls, 0.350 sec)
Generated 05-Aug-2011 13:02:45 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
legendcolorbarlayout>doLayoutsubfunction165
Lines where the most time was spent

Line NumberCodeCallsTotal Time% TimeTime Plot
659
bottomChange = localGetXLabelH...
1650.109 s31.2%
650
leftChange = localGetYLabelWid...
1650.066 s18.7%
669
topChange = localGetTitleHeigh...
1650.055 s15.6%
641
p = topixels(ax,[corner1; corn...
1300.033 s9.4%
661
if strcmpi(get(ax,'XAxisLocati...
1650.011 s3.1%
All other lines  0.077 s21.9%
Totals  0.350 s100% 
Children (called functions)

Function NameFunction TypeCallsTotal Time% TimeTime Plot
...ndcolorbarlayout>localGetXLabelHeightsubfunction1650.109 s31.2%
legendcolorbarlayout>localGetYLabelWidthsubfunction1650.066 s18.7%
legendcolorbarlayout>localGetTitleHeightsubfunction1650.055 s15.6%
legendcolorbarlayout>topixelssubfunction1300.033 s9.4%
Self time (built-ins, overhead, etc.)  0.087 s25.0%
Totals  0.350 s100% 
Code Analyzer results
No Code Analyzer messages.
Coverage results
[ Show coverage for parent directory ]
Total lines in function39
Non-code lines (comments, blank lines)7
Code lines (lines that can run)32
Code lines that did run28
Code lines that did not run4
Coverage (did run/can run)87.50 %
Function listing
   time   calls  line
633 function [corner1,corner2] = getPixelBounds(ax,textObjects,withPixBounds)
0.01 165 634 corner1 = get(textObjects(1),'PixelBounds');
165 635 corner2 = get(textObjects(2),'PixelBounds');
165 636 if ~withPixBounds || all(corner1 == 0) || all(corner2 == 0)
0.01 130 637 opos = get(textObjects,'Position');
0.01 130 638 set(textObjects,'Units','data');
0.01 130 639 corner1 = get(textObjects(1),'Position');
0.01 130 640 corner2 = get(textObjects(2),'Position');
0.03 130 641 p = topixels(ax,[corner1; corner2]);
0.01 130 642 set(textObjects,'Units','normalized');
0.01 130 643 set(textObjects,{'Position'},opos);
130 644 corner1 = [p(1,:) p(1,:)];
130 645 corner2 = [p(2,:) p(2,:)];
130 646 end
647
648 % The text objects do not take the XLabel or YLabels into account. Add an
649 % offset for the X-Label and Y-Label for the bottom left corner.
0.07 165 650 leftChange = localGetYLabelWidth(ax,'Pixels');
651 % If the Y-axis is on the right, change the top right corner
165 652 if strcmpi(get(ax,'YAxisLocation'),'Right')
653 corner2(1) = corner2(1) + leftChange;
654 corner2(3) = corner2(3) + leftChange;
165 655 else % Otherwise change the bottom left corner
165 656 corner1(1) = corner1(1) - leftChange;
165 657 corner1(3) = corner1(3) - leftChange;
165 658 end
0.11 165 659 bottomChange = localGetXLabelHeight(ax,'Pixels');
660 % If the X-axis is on top, change the top right corner
0.01 165 661 if strcmpi(get(ax,'XAxisLocation'),'Top')
662 corner2(2) = corner2(2) - bottomChange;
663 corner2(4) = corner2(4) - bottomChange;
165 664 else % Otherwise change the bottom left corner
165 665 corner1(2) = corner1(2) + bottomChange;
165 666 corner1(4) = corner1(4) + bottomChange;
165 667 end
668 % We also need to deal with titles;
0.05 165 669 topChange = localGetTitleHeight(ax,'Pixels');
165 670 corner2(2) = corner2(2) - topChange;
165 671 corner2(4) = corner2(4) - topChange;

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