This is a static copy of a profile reportHome
scribe/private/expandLegendChildren (2 calls, 0.073 sec)
Generated 18-Mar-2011 23:32:04 using cpu time.
M-function in file /Applications/MATLAB_R2010a.app/toolbox/matlab/scribe/private/expandLegendChildren.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 |
11 | hA = get(legKids(i),'Annotatio... | 372 | 0.041 s | 57.1% |  |
22 | else | 372 | 0.010 s | 14.3% |  |
14 | if ishandle(hL) && str... | 372 | 0.010 s | 14.3% |  |
13 | hL = get(hA,'LegendInformation... | 372 | 0.010 s | 14.3% |  |
28 | end | 372 | 0 s | 0% |  |
All other lines | | | 0 s | 0% |  |
Totals | | | 0.073 s | 100% | |
Children (called functions)
No childrenM-Lint results
Line number | Message |
17 | The variable 'legKidsOut' appears to change size on every loop iteration. Consider preallocating for speed. |
20 | The variable 'legKidsOut' appears to change size on every loop iteration. Consider preallocating for speed. |
23 | The variable 'legKidsOut' appears to change size on every loop iteration. Consider preallocating for speed. |
26 | The variable 'legKidsOut' appears to change size on every loop iteration. Consider preallocating for speed. |
Coverage results
[ Show coverage for parent directory ]
Total lines in function | 28 |
Non-code lines (comments, blank lines) | 10 |
Code lines (lines that can run) | 18 |
Code lines that did run | 10 |
Code lines that did not run | 8 |
Coverage (did run/can run) | 55.56 % |
Function listing
time calls line
1 function legKidsOut = expandLegendChildren(legKids)
2 %EXPANDLEGENDCHILDREN recursively goes through a list of graphics objects,
3 % expanding groups whose "LegendEntry" display property is set to
4 % "Children".
5
6 % Copyright 2007 The MathWorks, Inc.
7
8
2 9 legKidsOut = [];
2 10 for i = 1:length(legKids)
0.04 372 11 hA = get(legKids(i),'Annotation');
372 12 if ishandle(hA)
0.01 372 13 hL = get(hA,'LegendInformation');
0.01 372 14 if ishandle(hL) && strcmpi(hL.IconDisplayStyle,'Children')
15 if isprop(handle(legKids(i)),'Children') && ...
16 ~isempty(get(legKids(i),'Children'))
17 legKidsOut = [legKidsOut;...
18 expandLegendChildren(get(legKids(i),'Children'))];
19 else
20 legKidsOut = [legKidsOut;legKids(i)];
21 end
0.01 372 22 else
372 23 legKidsOut = [legKidsOut;legKids(i)];
372 24 end
25 else
26 legKidsOut = [legKidsOut;legKids(i)];
27 end
372 28 end