This is a static copy of a profile reportHome
legendcolorbarlayout>localGetTitleHeight (195 calls, 0.066 sec)
Generated 05-Aug-2011 13:02:38 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)
Lines where the most time was spent
Line Number | Code | Calls | Total Time | % Time | Time Plot |
718 | if ~isprop(titleLab,'CachedPos... | 159 | 0.033 s | 50.0% |  |
707 | if ~is2D(ax) | 195 | 0.033 s | 50.0% |  |
727 | height = height(4); | 143 | 0 s | 0% |  |
726 | height = hgconvertunits(hFig,[... | 143 | 0 s | 0% |  |
725 | hFig = ancestor(ax,'Figure'); | 143 | 0 s | 0% |  |
All other lines | | | 0 s | 0% |  |
Totals | | | 0.066 s | 100% | |
Children (called functions)
Function Name | Function Type | Calls | Total Time | % Time | Time Plot |
isprop | function | 159 | 0.033 s | 50.0% |  |
is2D | function | 195 | 0.033 s | 50.0% |  |
Self time (built-ins, overhead, etc.) | | | 0 s | 0% |  |
Totals | | | 0.066 s | 100% | |
Code Analyzer results
No Code Analyzer 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 | 13 |
Code lines that did not run | 5 |
Coverage (did run/can run) | 72.22 % |
Function listing
time calls line
703 function height = localGetTitleHeight(ax,units)
704 % Returns the height (in the units specified) of an axes Title.
705
706 % If we are not a 2-D axes, return early
0.03 195 707 if ~is2D(ax)
708 height = 0;
709 return;
710 end
711
195 712 titleLab = get(ax,'Title');
195 713 if isempty(get(titleLab,'String'))
36 714 height = 0;
36 715 return;
716 end
717 % If the label is in "manual" mode, don't use it in computations:
0.03 159 718 if ~isprop(titleLab,'CachedPosition') || ...
719 ~isequal(get(titleLab,'CachedPosition'),get(titleLab,'Position'))
16 720 height = 0;
16 721 return;
722 end
143 723 pixBounds = get(titleLab,'PixelBounds');
143 724 bottomChange = pixBounds(4) - pixBounds(2);
143 725 hFig = ancestor(ax,'Figure');
143 726 height = hgconvertunits(hFig,[0 0 0 bottomChange],'Pixels',units,get(ax,'Parent'));
143 727 height = height(4);
Other subfunctions in this file are not included in this listing.