This is a static copy of a profile reportHome
legendcolorbarlayout>localGetXLabelHeight (20 calls, 0.000 sec)
Generated 18-Mar-2011 23:31:50 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
No measurable time spent in this functionLine Number | Code | Calls | Total Time | % Time | Time Plot |
681 | return; | 20 | 0 s | 0% |  |
680 | height = 0; | 20 | 0 s | 0% |  |
679 | if isempty(get(xLab,'String')) | 20 | 0 s | 0% |  |
676 | xLab = get(ax,'XLabel'); | 20 | 0 s | 0% |  |
671 | if ~is2D(ax) | 20 | 0 s | 0% |  |
All other lines | | | 0 s | 0% |  |
Totals | | | 0 s | 0% | |
Children (called functions)
Function Name | Function Type | Calls | Total Time | % Time | Time Plot |
is2D | M-function | 20 | 0 s | 0% |  |
Self time (built-ins, overhead, etc.) | | | 0 s | 0% |  |
Totals | | | 0 s | 0% | |
M-Lint results
No M-Lint 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 | 5 |
Code lines that did not run | 13 |
Coverage (did run/can run) | 27.78 % |
Function listing
time calls line
667 function height = localGetXLabelHeight(ax,units)
668 % Returns the height (in the units specified) of an axes XLabel.
669
670 % If we are not a 2-D axes, return early
20 671 if ~is2D(ax)
672 height = 0;
673 return;
674 end
675
20 676 xLab = get(ax,'XLabel');
677
678 % If there is no string, the height is 0
20 679 if isempty(get(xLab,'String'))
20 680 height = 0;
20 681 return;
682 end
683 % If the label is in "manual" mode, don't use it in computations:
684 if ~isprop(xLab,'CachedPosition') || ...
685 ~isequal(get(xLab,'CachedPosition'),get(xLab,'Position'))
686 height = 0;
687 return;
688 end
689 pixBounds = get(xLab,'PixelBounds');
690 bottomChange = pixBounds(4) - pixBounds(2);
691 hFig = ancestor(ax,'Figure');
692 height = hgconvertunits(hFig,[0 0 0 bottomChange],'Pixels',units,get(ax,'Parent'));
693 height = height(4);
Other subfunctions in this file are not included in this listing.