This is a static copy of a profile reportHome
newplot>ObserveAxesNextPlot (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 |
124 | switch get(ax,'nextplot') | 27 | 0.010 s | 100.0% |  |
133 | if ~any(ishghandle(ax)) &&... | 27 | 0 s | 0% |  |
131 | end | 27 | 0 s | 0% |  |
129 | case 'add' | 27 | 0 s | 0% |  |
127 | case 'replacechildren' | 27 | 0 s | 0% |  |
All other lines | | | 0 s | 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 | 31 |
Non-code lines (comments, blank lines) | 13 |
Code lines (lines that can run) | 18 |
Code lines that did run | 8 |
Code lines that did not run | 10 |
Coverage (did run/can run) | 44.44 % |
Function listing
time calls line
109 function ax = ObserveAxesNextPlot(ax, hsave)
110 %
111 % Helper fcn for preparing axes for nextplot, optionally
112 % preserving specific existing descendants
113 % GUARANTEED to return an axes in the same figure as the passed-in
114 % axes, even if that axes gets deleted by an overzealous create or
115 % delete fcn anywhere in the figure.
116 %
117
118 % for performance only call ancestor when needed
27 119 fig = get(ax,'Parent');
27 120 if ~strcmp(get(fig,'Type'),'figure')
121 fig = ancestor(fig,'figure');
122 end
123
0.01 27 124 switch get(ax,'nextplot')
27 125 case 'replace'
126 cla(ax, 'reset',hsave);
27 127 case 'replacechildren'
128 cla(ax, hsave);
27 129 case 'add'
130 % nothing
27 131 end
132
27 133 if ~any(ishghandle(ax)) && isempty(hsave)
134 if ~any(ishghandle(fig))
135 ax = axes;
136 else
137 ax = axes('parent',fig);
138 end
139 end