This is a static copy of a profile report

Home

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)

Function NameFunction TypeCalls
scribe/private/get_legendable_childrenfunction13
Lines where the most time was spent

Line NumberCodeCallsTotal Time% TimeTime Plot
20
if ishandle(hL) && str...
510.011 s100.0%
34
end
510 s0%
30
end
510 s0%
29
legKidsOut = [legKidsOut;legKi...
510 s0%
28
else
510 s0%
All other lines  0 s0%
Totals  0.011 s100% 
Children (called functions)
No children
Code Analyzer results
Line numberMessage
23The variable 'legKidsOut' appears to change size on every loop iteration. Consider preallocating for speed.
26The variable 'legKidsOut' appears to change size on every loop iteration. Consider preallocating for speed.
29The variable 'legKidsOut' appears to change size on every loop iteration. Consider preallocating for speed.
32The variable 'legKidsOut' appears to change size on every loop iteration. Consider preallocating for speed.
Coverage results
[ Show coverage for parent directory ]
Total lines in function34
Non-code lines (comments, blank lines)13
Code lines (lines that can run)21
Code lines that did run11
Code lines that did not run10
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