This is a static copy of a profile reportHome
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)
Lines where the most time was spent
Line Number | Code | Calls | Total Time | % Time | Time Plot |
727 | if ~is2D(ax) | 20 | 0.010 s | 100.0% |  |
735 | return; | 20 | 0 s | 0% |  |
734 | width = 0; | 20 | 0 s | 0% |  |
733 | if isempty(get(yLab,'String')) | 20 | 0 s | 0% |  |
732 | yLab = get(ax,'YLabel'); | 20 | 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 | 20 | 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 | 26 |
Non-code lines (comments, blank lines) | 8 |
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
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.