This is a static copy of a profile reportHome
legendcolorbarlayout>localGetTitleHeight (22 calls, 0.010 sec)
Generated 18-Mar-2011 23:31:52 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)
Lines where the most time was spent
Line Number | Code | Calls | Total Time | % Time | Time Plot |
700 | if ~is2D(ax) | 22 | 0.010 s | 100.0% |  |
708 | return; | 22 | 0 s | 0% |  |
707 | height = 0; | 22 | 0 s | 0% |  |
706 | if isempty(get(titleLab,'Strin... | 22 | 0 s | 0% |  |
705 | titleLab = get(ax,'Title'); | 22 | 0 s | 0% |  |
All other lines | | | 0 s | 0% |  |
Totals | | | 0.010 s | 100% | |
Children (called functions)
Function Name | Function Type | Calls | Total Time | % Time | Time Plot |
is2D | M-function | 22 | 0 s | 0% |  |
Self time (built-ins, overhead, etc.) | | | 0.010 s | 100.0% |  |
Totals | | | 0.010 s | 100% | |
M-Lint results
No M-Lint messages.Coverage results
[ Show coverage for parent directory ]
Total lines in function | 25 |
Non-code lines (comments, blank lines) | 7 |
Code lines (lines that can run) | 18 |
Code lines that did run | 5 |
Code lines that did not run | 13 |
Coverage (did run/can run) | 27.78 % |
Function listing
time calls line
696 function height = localGetTitleHeight(ax,units)
697 % Returns the height (in the units specified) of an axes Title.
698
699 % If we are not a 2-D axes, return early
0.01 22 700 if ~is2D(ax)
701 height = 0;
702 return;
703 end
704
22 705 titleLab = get(ax,'Title');
22 706 if isempty(get(titleLab,'String'))
22 707 height = 0;
22 708 return;
709 end
710 % If the label is in "manual" mode, don't use it in computations:
711 if ~isprop(titleLab,'CachedPosition') || ...
712 ~isequal(get(titleLab,'CachedPosition'),get(titleLab,'Position'))
713 height = 0;
714 return;
715 end
716 pixBounds = get(titleLab,'PixelBounds');
717 bottomChange = pixBounds(4) - pixBounds(2);
718 hFig = ancestor(ax,'Figure');
719 height = hgconvertunits(hFig,[0 0 0 bottomChange],'Pixels',units,get(ax,'Parent'));
720 height = height(4);
Other subfunctions in this file are not included in this listing.