This is a static copy of a profile report

Home

newplot>ObserveFigureNextPlot (6629 calls, 0.554 sec)
Generated 14-Nov-2016 07:47:13 using cpu time.
subfunction in file /usr/local/MATLAB/MATLAB_Production_Server/R2015a/toolbox/matlab/graphics/newplot.m
Copy to new window for comparing multiple runs

Parents (calling functions)

Function NameFunction TypeCalls
newplotfunction6629
Lines where the most time was spent

Line NumberCodeCallsTotal Time% TimeTime Plot
88
switch get(fig,'nextplot')
66290.292 s52.7%
103
if ~any(ishghandle(fig)) &...
66290.091 s16.4%
89
case 'new'
66290.040 s7.3%
98
case 'replacechildren'
66290.020 s3.6%
102
end
66290.010 s1.8%
All other lines  0.101 s18.2%
Totals  0.554 s100% 
Children (called functions)
No children
Code Analyzer results
No Code Analyzer messages.
Coverage results
Show coverage for parent directory
Total lines in function25
Non-code lines (comments, blank lines)11
Code lines (lines that can run)14
Code lines that did run7
Code lines that did not run7
Coverage (did run/can run)50.00 %
Function listing
time 
calls 
 line
  81 
function fig = ObserveFigureNextPlot(fig, hsave)
  82 
%
  83 
% Helper fcn for preparing figure for nextplot, optionally
  84 
% preserving specific existing descendants.
  85 
% GUARANTEED to return a figure, even if some crazy combination
  86 
% of create / delete fcns deletes it.
  87 
%
  0.29 
   6629 
  88 
switch get(fig,'nextplot') 
  0.04 
   6629 
  89 
  case 'new' 
  90 
    % if someone calls plot(x,y,'parent',h) and h is an axes
  91 
    % in a figure with NextPlot 'new', ignore the 'new' and
  92 
    % treat it as 'add' - just add the axes to that figure.
  93 
    if isempty(hsave)
  94 
      fig = figure;
  95 
    end
  0.01 
   6629 
  96 
  case 'replace' 
  97 
    clf(fig, 'reset', hsave);
  0.02 
   6629 
  98 
  case 'replacechildren' 
  99 
    clf(fig, hsave);
   6629 
 100 
  case 'add' 
 101 
    % nothing    
  0.01 
   6629 
 102 
end 
  0.09 
   6629 
 103 
if ~any(ishghandle(fig)) && isempty(hsave) 
 104 
  fig = figure;
 105 
end

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