This is a static copy of a profile reportHome
legendcolorbarlayout>localGetXLabelHeight (172 calls, 0.109 sec)
Generated 05-Aug-2011 13:02:36 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 |
678 | if ~is2D(ax) | 172 | 0.044 s | 40.0% |  |
691 | if ~isprop(xLab,'CachedPositio... | 132 | 0.033 s | 30.0% |  |
686 | if isempty(get(xLab,'String')) | 172 | 0.022 s | 20.0% |  |
683 | xLab = get(ax,'XLabel'); | 172 | 0.011 s | 10.0% |  |
700 | height = height(4); | 117 | 0 s | 0% |  |
All other lines | | | 0 s | 0% |  |
Totals | | | 0.109 s | 100% | |
Children (called functions)
Function Name | Function Type | Calls | Total Time | % Time | Time Plot |
is2D | function | 172 | 0.044 s | 40.0% |  |
isprop | function | 132 | 0.022 s | 20.0% |  |
Self time (built-ins, overhead, etc.) | | | 0.044 s | 40.0% |  |
Totals | | | 0.109 s | 100% | |
Code Analyzer results
No Code Analyzer messages.Coverage results
[ Show coverage for parent directory ]
Total lines in function | 27 |
Non-code lines (comments, blank lines) | 9 |
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
674 function height = localGetXLabelHeight(ax,units)
675 % Returns the height (in the units specified) of an axes XLabel.
676
677 % If we are not a 2-D axes, return early
0.04 172 678 if ~is2D(ax)
679 height = 0;
680 return;
681 end
682
0.01 172 683 xLab = get(ax,'XLabel');
684
685 % If there is no string, the height is 0
0.02 172 686 if isempty(get(xLab,'String'))
40 687 height = 0;
40 688 return;
689 end
690 % If the label is in "manual" mode, don't use it in computations:
0.03 132 691 if ~isprop(xLab,'CachedPosition') || ...
692 ~isequal(get(xLab,'CachedPosition'),get(xLab,'Position'))
15 693 height = 0;
15 694 return;
695 end
117 696 pixBounds = get(xLab,'PixelBounds');
117 697 bottomChange = pixBounds(4) - pixBounds(2);
117 698 hFig = ancestor(ax,'Figure');
117 699 height = hgconvertunits(hFig,[0 0 0 bottomChange],'Pixels',units,get(ax,'Parent'));
117 700 height = height(4);
Other subfunctions in this file are not included in this listing.