This is a static copy of a profile report

Home

scribe/private/islegendable (372 calls, 0.238 sec)
Generated 18-Mar-2011 23:32:04 using cpu time.
M-function in file /Applications/MATLAB_R2010a.app/toolbox/matlab/scribe/private/islegendable.m
Copy to new window for comparing multiple runs

Parents (calling functions)

Function NameFunction TypeCalls
scribe/private/get_legendable_childrenM-function372
Lines where the most time was spent

Line NumberCodeCallsTotal Time% TimeTime Plot
11
if ( (isempty(get(h,'xdata')) ...
3720.073 s30.4%
41
res = hasbehavior(h,'legend');
3720.062 s26.1%
9
switch get(h,'Type')
3720.041 s17.4%
40
if res
3720.010 s4.3%
37
end
3720.010 s4.3%
All other lines  0.041 s17.4%
Totals  0.238 s100% 
Children (called functions)

Function NameFunction TypeCallsTotal Time% TimeTime Plot
hasbehaviorM-function7440.104 s43.5%
scribe/private/islegendable>isallnanM-subfunction3720 s0%
Self time (built-ins, overhead, etc.)  0.135 s56.5%
Totals  0.238 s100% 
M-Lint results
No M-Lint messages.
Coverage results
[ Show coverage for parent directory ]
Total lines in function42
Non-code lines (comments, blank lines)13
Code lines (lines that can run)29
Code lines that did run16
Code lines that did not run13
Coverage (did run/can run)55.17 %
Function listing
   time   calls  line
1 function res=islegendable(h,includeImages)
2 %ISLEGENDABLE Tests if an object should be can in a legend
3 % RES = ISLEGENDABLE(H) returns true if graphics object H can
4 % be shown in a legend.
5
6 % Copyright 1984-2007 The MathWorks, Inc.
7
0.01 372 8 res= true;
0.04 372 9 switch get(h,'Type')
372 10 case {'line','patch','surface'}
0.07 372 11 if ( (isempty(get(h,'xdata')) || isallnan(get(h,'xdata'))) && ...
12 (isempty(get(h,'ydata')) || isallnan(get(h,'ydata'))) && ...
13 (isempty(get(h,'zdata')) || isallnan(get(h,'zdata'))) ) || ...
14 ~hasbehavior(h,'legend')
15 res = false;
16 end
17 case {'hggroup','hgtransform'}
18 if isempty(get(h,'Children'))
19 res = false;
20 end
21 case {'image'}
22 if ~includeImages || ~hasbehavior(h,'legend')
23 res = false;
24 end
25 otherwise
26 res = false;
27 end
28
29 % Take the "LegendEntry" display property into account.
372 30 if res
0.01 372 31 hA = get(h,'Annotation');
372 32 if ishandle(hA)
372 33 hL = hA.LegendInformation;
0.01 372 34 if ishandle(hL)
372 35 res = ~strcmpi(hL.IconDisplayStyle,'off');
372 36 end
0.01 372 37 end
372 38 end
39
0.01 372 40 if res
0.06 372 41 res = hasbehavior(h,'legend');
372 42 end

Other subfunctions in this file are not included in this listing.