This is a static copy of a profile reportHome
newplot>ObserveFigureNextPlot (27 calls, 0.010 sec)
Generated 18-Mar-2011 23:31:45 using cpu time.
M-subfunction in file /Applications/MATLAB_R2010a.app/toolbox/matlab/graphics/newplot.m
Copy to new window for comparing multiple runs
Parents (calling functions)
Function Name | Function Type | Calls |
newplot | M-function | 27 |
Lines where the most time was spent
Line Number | Code | Calls | Total Time | % Time | Time Plot |
105 | if ~any(ishghandle(fig)) &... | 27 | 0 s | 0% |  |
104 | end | 27 | 0 s | 0% |  |
102 | case 'add' | 27 | 0 s | 0% |  |
100 | case 'replacechildren' | 27 | 0 s | 0% |  |
98 | case 'replace' | 27 | 0 s | 0% |  |
All other lines | | | 0.010 s | 100.0% |  |
Totals | | | 0.010 s | 100% | |
Children (called functions)
No childrenM-Lint results
No M-Lint 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
83 function fig = ObserveFigureNextPlot(fig, hsave)
84 %
85 % Helper fcn for preparing figure for nextplot, optionally
86 % preserving specific existing descendants.
87 % GUARANTEED to return a figure, even if some crazy combination
88 % of create / delete fcns deletes it.
89 %
27 90 switch get(fig,'nextplot')
27 91 case 'new'
92 % if someone calls plot(x,y,'parent',h) and h is an axes
93 % in a figure with NextPlot 'new', ignore the 'new' and
94 % treat it as 'add' - just add the axes to that figure.
95 if isempty(hsave)
96 fig = figure;
97 end
27 98 case 'replace'
99 clf(fig, 'reset', hsave);
27 100 case 'replacechildren'
101 clf(fig, hsave);
27 102 case 'add'
103 % nothing
27 104 end
27 105 if ~any(ishghandle(fig)) && isempty(hsave)
106 fig = figure;
107 end
Other subfunctions in this file are not included in this listing.