This is a static copy of a profile report

Home

legend>find_legend (Calls: 8, Time: 0.006 s)
Generated 16-Jul-2020 17:10:02 using performance time.
subfunction in file /Applications/MATLAB_R2020a.app/toolbox/matlab/scribe/legend.m
Copy to new window for comparing multiple runs

Parents (calling functions)

Function NameFunction TypeCalls
legend>make_legendsubfunction8
Lines where the most time was spent

Line NumberCodeCallsTotal Time% TimeTime Plot
418
leg = matlab.graphics.illustra...
80.002 s44.6%
419
ha = getGraphicsAxes(leg,ha);
80.001 s26.8%
428
leg = ha.Legend;
80.000 s8.1%
422
if isappdata(ha,'graphicsPloty...
80.000 s8.0%
412
if isempty(ha) || ~ishghandle(...
80.000 s7.0%
All other lines  0.000 s5.3%
Totals  0.006 s100% 
Children (called functions)

Function NameFunction TypeCallsTotal Time% TimeTime Plot
Legend.Legend>Legend.getGraphicsAxesclass method80.001 s17.4%
Self time (built-ins, overhead, etc.)  0.005 s82.6%
Totals  0.006 s100% 
Code Analyzer results
Line numberMessage
Coverage results
Show coverage for parent directory
Total lines in function21
Non-code lines (comments, blank lines)9
Code lines (lines that can run)12
Code lines that did run7
Code lines that did not run5
Coverage (did run/can run)58.33 %
Function listing
time 
Calls 
 line
 408 
function leg = find_legend(ha)
 409 

 410 
% Using the Legend property of ha, we will find the legend peered to
 411 
% the current axes.
< 0.001 
      8 
 412
if isempty(ha) || ~ishghandle(ha) 
 413 
    leg = gobjects(0);
 414 
    return;
< 0.001 
      8 
 415
end 
 416 

 417 
% get the graphics Axes so we can handle the plotyy case generally
  0.002 
      8 
 418
leg = matlab.graphics.illustration.Legend.empty; 
  0.001 
      8 
 419
ha = getGraphicsAxes(leg,ha); 
 420 

 421 
% If we have the submissive plotyy axes, get the real one
< 0.001 
      8 
 422
if isappdata(ha,'graphicsPlotyyPeer') && ... 
 423 
   isvalid(getappdata(ha,'graphicsPlotyyPeer')) && ...
 424 
   strcmp(ha.Color,'none')
 425 
    ha = getappdata(ha,'graphicsPlotyyPeer');
< 0.001 
      8 
 426
end 
 427 

< 0.001 
      8 
 428
leg = ha.Legend; 

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