This is a static copy of a profile report

Home

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 NameFunction TypeCalls
newplotM-function27
Lines where the most time was spent

Line NumberCodeCallsTotal Time% TimeTime Plot
124
switch get(ax,'nextplot')
270.010 s100.0%
133
if ~any(ishghandle(ax)) &&...
270 s0%
131
end
270 s0%
129
case 'add'
270 s0%
127
case 'replacechildren'
270 s0%
All other lines  0 s0%
Totals  0.010 s100% 
Children (called functions)
No children
M-Lint results
No M-Lint messages.
Coverage results
[ Show coverage for parent directory ]
Total lines in function31
Non-code lines (comments, blank lines)13
Code lines (lines that can run)18
Code lines that did run8
Code lines that did not run10
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