This is a static copy of a profile reportHome
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 Name | Function Type | Calls |
newplot | function | 677 |
Lines where the most time was spent
Line Number | Code | Calls | Total Time | % Time | Time Plot |
99 | case 'replacechildren' | 677 | 0.011 s | 50.0% |  |
89 | switch get(fig,'nextplot') | 677 | 0.011 s | 50.0% |  |
104 | if ~any(ishghandle(fig)) &... | 677 | 0 s | 0% |  |
103 | end | 677 | 0 s | 0% |  |
101 | case 'add' | 677 | 0 s | 0% |  |
All other lines | | | 0 s | 0% |  |
Totals | | | 0.022 s | 100% | |
Children (called functions)
No childrenCode Analyzer results
No Code Analyzer messages.Coverage results
[ Show coverage for parent directory ]
Total lines in function | 25 |
Non-code lines (comments, blank lines) | 11 |
Code lines (lines that can run) | 14 |
Code lines that did run | 7 |
Code lines that did not run | 7 |
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.