This is a static copy of a profile report

Home

newplot>ObserveAxesNextPlot (677 calls, 0.831 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
125
cla(ax, 'reset',hsave);    
2430.765 s92.1%
126
case 'replacechildren'
4340.022 s2.6%
132
if ~any(ishghandle(ax)) &&...
6770.011 s1.3%
128
case 'add'
4340.011 s1.3%
123
switch get(ax,'nextplot')
6770.011 s1.3%
All other lines  0.011 s1.3%
Totals  0.831 s100% 
Children (called functions)

Function NameFunction TypeCallsTotal Time% TimeTime Plot
clafunction2430.754 s90.8%
Self time (built-ins, overhead, etc.)  0.077 s9.2%
Totals  0.831 s100% 
Code Analyzer results
No Code Analyzer 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 run9
Code lines that did not run9
Coverage (did run/can run)50.00 %
Function listing
   time   calls  line
108 function ax = ObserveAxesNextPlot(ax, hsave)
109 %
110 % Helper fcn for preparing axes for nextplot, optionally
111 % preserving specific existing descendants
112 % GUARANTEED to return an axes in the same figure as the passed-in
113 % axes, even if that axes gets deleted by an overzealous create or
114 % delete fcn anywhere in the figure.
115 %
116
117 % for performance only call ancestor when needed
677 118 fig = get(ax,'Parent');
0.01 677 119 if ~strcmp(get(fig,'Type'),'figure')
120 fig = ancestor(fig,'figure');
121 end
122
0.01 677 123 switch get(ax,'nextplot')
677 124 case 'replace'
0.77 243 125 cla(ax, 'reset',hsave);
0.02 434 126 case 'replacechildren'
127 cla(ax, hsave);
0.01 434 128 case 'add'
129 % nothing
434 130 end
131
0.01 677 132 if ~any(ishghandle(ax)) && isempty(hsave)
133 if ~any(ishghandle(fig))
134 ax = axes;
135 else
136 ax = axes('parent',fig);
137 end
138 end