This is a static copy of a profile report

Home

newplot>ObserveFigureNextPlot (677 calls, 0.022 sec)
Generated 05-Aug-2011 13:03:29 using cpu time.
subfunction in file /usr/local/MATLAB/R2011a/toolbox/matlab/graphics/newplot.m
Copy to new window for comparing multiple runs

Parents (calling functions)

Function NameFunction TypeCalls
newplotfunction677
Lines where the most time was spent

Line NumberCodeCallsTotal Time% TimeTime Plot
99
case 'replacechildren'
6770.011 s50.0%
89
switch get(fig,'nextplot')
6770.011 s50.0%
104
if ~any(ishghandle(fig)) &...
6770 s0%
103
end
6770 s0%
101
case 'add'
6770 s0%
All other lines  0 s0%
Totals  0.022 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
82 function fig = ObserveFigureNextPlot(fig, hsave)
83 %
84 % Helper fcn for preparing figure for nextplot, optionally
85 % preserving specific existing descendants.
86 % GUARANTEED to return a figure, even if some crazy combination
87 % of create / delete fcns deletes it.
88 %
0.01 677 89 switch get(fig,'nextplot')
677 90 case 'new'
91 % if someone calls plot(x,y,'parent',h) and h is an axes
92 % in a figure with NextPlot 'new', ignore the 'new' and
93 % treat it as 'add' - just add the axes to that figure.
94 if isempty(hsave)
95 fig = figure;
96 end
677 97 case 'replace'
98 clf(fig, 'reset', hsave);
0.01 677 99 case 'replacechildren'
100 clf(fig, hsave);
677 101 case 'add'
102 % nothing
677 103 end
677 104 if ~any(ishghandle(fig)) && isempty(hsave)
105 fig = figure;
106 end

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