This is a static copy of a profile reportHome
legend>find_legend (14 calls, 0.000 sec)
Generated 05-Aug-2011 13:03:44 using cpu time.
subfunction in file /usr/local/MATLAB/R2011a/toolbox/matlab/scribe/legend.m
Copy to new window for comparing multiple runs
Parents (calling functions)
Lines where the most time was spent
No measurable time spent in this functionLine Number | Code | Calls | Total Time | % Time | Time Plot |
421 | end | 6 | 0 s | 0% |  |
420 | leg = []; | 6 | 0 s | 0% |  |
419 | rmappdata(double(ha),'LegendPe... | 6 | 0 s | 0% |  |
417 | if ~ishandle(leg) || ~isequal(... | 6 | 0 s | 0% |  |
416 | leg = getappdata(double(ha),'L... | 6 | 0 s | 0% |  |
All other lines | | | 0 s | 0% |  |
Totals | | | 0 s | 0% | |
Children (called functions)
No childrenCode Analyzer results
Coverage results
[ Show coverage for parent directory ]
Total lines in function | 18 |
Non-code lines (comments, blank lines) | 6 |
Code lines (lines that can run) | 12 |
Code lines that did run | 9 |
Code lines that did not run | 3 |
Coverage (did run/can run) | 75.00 % |
Function listing
time calls line
404 function leg = find_legend(ha)
405
406 % Using the "LegendPeerHandle" appdata, we will find the legend peered to
407 % the current axes. This handle may be invalid due to copy/paste effects.
408 % In this case, the appdata will be reset.
14 409 leg = [];
14 410 if isempty(ha) || ~ishandle(ha)
411 return;
412 end
14 413 if ~isappdata(double(ha),'LegendPeerHandle')
8 414 return;
415 end
6 416 leg = getappdata(double(ha),'LegendPeerHandle');
6 417 if ~ishandle(leg) || ~isequal(get(leg,'Axes'),handle(ha))
418 % Reset the "LegendPeerHandle" appdata
6 419 rmappdata(double(ha),'LegendPeerHandle');
6 420 leg = [];
6 421 end
Other subfunctions in this file are not included in this listing.