This is a static copy of a profile report

Home

legendcolorbarlayout>localGetYLabelWidth (20 calls, 0.010 sec)
Generated 18-Mar-2011 23:31:48 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
legendcolorbarlayout>getPixelBoundsM-subfunction20
Lines where the most time was spent

Line NumberCodeCallsTotal Time% TimeTime Plot
727
if ~is2D(ax)
200.010 s100.0%
735
return;
200 s0%
734
width = 0;
200 s0%
733
if isempty(get(yLab,'String'))
200 s0%
732
yLab = get(ax,'YLabel');
200 s0%
All other lines  0 s0%
Totals  0.010 s100% 
Children (called functions)

Function NameFunction TypeCallsTotal Time% TimeTime Plot
is2DM-function200 s0%
Self time (built-ins, overhead, etc.)  0.010 s100.0%
Totals  0.010 s100% 
M-Lint results
No M-Lint messages.
Coverage results
[ Show coverage for parent directory ]
Total lines in function26
Non-code lines (comments, blank lines)8
Code lines (lines that can run)18
Code lines that did run5
Code lines that did not run13
Coverage (did run/can run)27.78 %
Function listing
   time   calls  line
723 function width = localGetYLabelWidth(ax,units)
724 % Returns the height (in the units specified) of an axes YLabel.
725
726 % If we are not a 2-D axes, return early
0.01 20 727 if ~is2D(ax)
728 width = 0;
729 return;
730 end
731
20 732 yLab = get(ax,'YLabel');
20 733 if isempty(get(yLab,'String'))
20 734 width = 0;
20 735 return;
736 end
737 % If the label is in "manual" mode, don't use it in computations:
738 if ~isprop(yLab,'CachedPosition') || ...
739 ~isequal(get(yLab,'CachedPosition'),get(yLab,'Position'))
740 width = 0;
741 return;
742 end
743 pixBounds = get(yLab,'PixelBounds');
744 % Add a small offset to keep things nice
745 leftChange = pixBounds(3) - pixBounds(1) + 10;
746 hFig = ancestor(ax,'Figure');
747 width = hgconvertunits(hFig,[0 0 leftChange 0],'Pixels',units,get(ax,'Parent'));
748 width = width(3);

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