islegendable (Calls: 62, Time: 0.090 s)
Generated 16-Jul-2020 17:08:55 using performance time.
function in file /Applications/MATLAB_R2020a.app/toolbox/matlab/graphics/illustration/+matlab/+graphics/+illustration/+internal/islegendable.m
Copy to new window for comparing multiple runs
Function Name | Function Type | Calls |
getLegendableChildren | function | 8 |
Legend.autoUpdateCallback | function | 54 |
Line Number | Code | Calls | Total Time | % Time | Time Plot |
16 | ~strcmpi(h.Annotation.LegendIn... | 434 | 0.028 s | 30.7% | |
15 | strcmpi(h.LegendDisplay,'on') ... | 434 | 0.018 s | 19.7% | |
17 | hasbehavior(h,'legend') | 434 | 0.016 s | 18.1% | |
22 | if res(i) && isa(h,'ma... | 434 | 0.008 s | 9.2% | |
14 | strcmp(h.HandleVisibility,'on'... | 434 | 0.008 s | 8.9% | |
All other lines | 0.012 s | 13.5% | |||
Totals | 0.090 s | 100% |
Function Name | Function Type | Calls | Total Time | % Time | Time Plot |
hasbehavior | function | 434 | 0.014 s | 15.3% | |
Self time (built-ins, overhead, etc.) | 0.076 s | 84.7% | |||
Totals | 0.090 s | 100% |
Total lines in function | 28 |
Non-code lines (comments, blank lines) | 11 |
Code lines (lines that can run) | 17 |
Code lines that did run | 14 |
Code lines that did not run | 3 |
Coverage (did run/can run) | 82.35 % |
time | Calls | line | |
---|---|---|---|
1 | function res=islegendable(in_array) | ||
2 | %ISLEGENDABLE Tests if an object can be in a legend | ||
3 | % RES = ISLEGENDABLE(H) returns true if graphics object H can | ||
4 | % be shown in a legend. | ||
5 | |||
6 | % Copyright 1984-2014 The MathWorks, Inc. | ||
7 | |||
< 0.001 | 62 | 8 | res = false(1,numel(in_array)); |
9 | |||
< 0.001 | 62 | 10 | for i = 1:numel(in_array) |
0.005 | 434 | 11 | h = in_array(i); |
0.074 | 434 | 12 | if isa(h,'matlab.graphics.mixin.Legendable') && ... |
434 | 13 | isvalid(h) && ... | |
434 | 14 | strcmp(h.HandleVisibility,'on') && ... | |
434 | 15 | strcmpi(h.LegendDisplay,'on') && ... | |
434 | 16 | ~strcmpi(h.Annotation.LegendInformation.IconDisplayStyle,'off') && ... | |
434 | 17 | hasbehavior(h,'legend') | |
18 | |||
< 0.001 | 434 | 19 | res(i) = true; |
20 | |||
21 | % if HGGroup, must have children | ||
0.008 | 434 | 22 | if res(i) && isa(h,'matlab.graphics.primitive.Group') |
23 | if isempty(h.Children') | ||
24 | res(i) = false; | ||
25 | end | ||
< 0.001 | 434 | 26 | end |
< 0.001 | 434 | 27 | end |
< 0.001 | 434 | 28 | end |
Other subfunctions in this file are not included in this listing.