This is a static copy of a profile reportHome
scribe/private/expandLegendChildren (13 calls, 0.011 sec)
Generated 05-Aug-2011 13:02:24 using cpu time.
function in file /usr/local/MATLAB/R2011a/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 |
20 | if ishandle(hL) && str... | 51 | 0.011 s | 100.0% |  |
34 | end | 51 | 0 s | 0% |  |
30 | end | 51 | 0 s | 0% |  |
29 | legKidsOut = [legKidsOut;legKi... | 51 | 0 s | 0% |  |
28 | else | 51 | 0 s | 0% |  |
All other lines | | | 0 s | 0% |  |
Totals | | | 0.011 s | 100% | |
Children (called functions)
No childrenCode Analyzer results
Line number | Message |
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. |
29 | The variable 'legKidsOut' appears to change size on every loop iteration. Consider preallocating for speed. |
32 | 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 | 34 |
Non-code lines (comments, blank lines) | 13 |
Code lines (lines that can run) | 21 |
Code lines that did run | 11 |
Code lines that did not run | 10 |
Coverage (did run/can run) | 52.38 % |
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-2010 The MathWorks, Inc.
7
8 % When using MCOS graphics it is possible to have axes children with no
9 % Annotation property (i.e. custom objects which do not implement the
10 % hg2mixin.HGAnnotatable, c.f. g644781)
13 11 if feature('HGUsingMATLABClasses')
12 legKids = findobj(legKids,'-isa','hg2mixin.HGAnnotatable');
13 end
14
13 15 legKidsOut = [];
13 16 for i = 1:length(legKids)
51 17 hA = get(legKids(i),'Annotation');
51 18 if ishandle(hA)
51 19 hL = get(hA,'LegendInformation');
0.01 51 20 if ishandle(hL) && strcmpi(hL.IconDisplayStyle,'Children')
21 if isprop(handle(legKids(i)),'Children') && ...
22 ~isempty(get(legKids(i),'Children'))
23 legKidsOut = [legKidsOut;...
24 expandLegendChildren(get(legKids(i),'Children'))];
25 else
26 legKidsOut = [legKidsOut;legKids(i)];
27 end
51 28 else
51 29 legKidsOut = [legKidsOut;legKids(i)];
51 30 end
31 else
32 legKidsOut = [legKidsOut;legKids(i)];
33 end
51 34 end