This is a static copy of a profile report

Home

hold (576 calls, 0.240 sec)
Generated 05-Aug-2011 13:03:26 using cpu time.
function in file /usr/local/MATLAB/R2011a/toolbox/matlab/graphics/hold.m
Copy to new window for comparing multiple runs

Parents (calling functions)

Function NameFunction TypeCalls
packdfunction16
plot_sourcesfunction2
genfig>plotfeatsubfunction270
genfig>plotflagsubfunction162
genfigLoadfunction30
genfigAlpha>plotflagsubfunction96
Lines where the most time was spent

Line NumberCodeCallsTotal Time% TimeTime Plot
35
ax = gca;
5760.066 s27.3%
46
nexta = get(ax,'NextPlot');
5760.055 s22.7%
32
[ax,args,nargs] = axescheck(va...
5760.033 s13.6%
62
setappdata(ax,'PlotHoldStyle',...
3920.022 s9.1%
47
nextf = get(fig,'NextPlot');
5760.022 s9.1%
All other lines  0.044 s18.2%
Totals  0.240 s100% 
Children (called functions)

Function NameFunction TypeCallsTotal Time% TimeTime Plot
gcffunction5760.055 s22.7%
axescheckfunction5760.033 s13.6%
scribe.legend.init>changedCurrentAxessubfunction10 s0%
Self time (built-ins, overhead, etc.)  0.153 s63.6%
Totals  0.240 s100% 
Code Analyzer results
No Code Analyzer messages.
Coverage results
[ Show coverage for parent directory ]
Total lines in function72
Non-code lines (comments, blank lines)33
Code lines (lines that can run)39
Code lines that did run25
Code lines that did not run14
Coverage (did run/can run)64.10 %
Function listing
   time   calls  line
1 function hold(varargin)
2 %HOLD Hold current graph
3 % HOLD ON holds the current plot and all axis properties so that
4 % subsequent graphing commands add to the existing graph.
5 % HOLD OFF returns to the default mode whereby PLOT commands erase
6 % the previous plots and reset all axis properties before drawing
7 % new plots.
8 % HOLD, by itself, toggles the hold state.
9 % HOLD does not affect axis autoranging properties.
10 %
11 % HOLD ALL holds the plot and the current color and linestyle so
12 % that subsequent plotting commands will not reset the color and
13 % linestyle.
14 %
15 % HOLD(AX,...) applies the command to the Axes object AX.
16 %
17 % Algorithm note:
18 % HOLD ON sets the NextPlot property of the current figure and
19 % axes to "add".
20 % HOLD OFF sets the NextPlot property of the current axes to
21 % "replace".
22 %
23 % See also ISHOLD, NEWPLOT, FIGURE, AXES.
24
25 % Copyright 1984-2008 The MathWorks, Inc.
26 % $Revision: 5.9.4.10 $ $Date: 2008/12/15 08:52:48 $
27
28 % Parse possible Axes input
0.01 576 29 error(nargchk(0,2,nargin));
30
31 % look for leading axes (must not be a vector of handles)
0.03 576 32 [ax,args,nargs] = axescheck(varargin{:});
33
576 34 if isempty(ax)
0.07 576 35 ax = gca;
576 36 end
576 37 fig = get(ax,'Parent');
0.02 576 38 if ~strcmp(get(fig,'Type'),'figure')
39 fig = ancestor(fig,'figure');
40 end
41
576 42 if ~isempty(args)
576 43 opt_hold_state = args{1};
576 44 end
45
0.05 576 46 nexta = get(ax,'NextPlot');
0.02 576 47 nextf = get(fig,'NextPlot');
576 48 hold_state = strcmp(nexta,'add') && strcmp(nextf,'add');
576 49 if(nargs == 0)
50 if(hold_state)
51 set(ax,'NextPlot','replace');
52 disp('Current plot released');
53 else
54 set(fig,'NextPlot','add');
55 set(ax,'NextPlot', 'add');
56 disp('Current plot held');
57 end
58 setappdata(ax,'PlotHoldStyle',false);
576 59 elseif(strcmp(opt_hold_state, 'on'))
392 60 set(fig,'NextPlot','add');
392 61 set(ax,'NextPlot','add');
0.02 392 62 setappdata(ax,'PlotHoldStyle',false);
184 63 elseif(strcmp(opt_hold_state, 'off'))
0.01 182 64 set(ax,'NextPlot', 'replace');
182 65 setappdata(ax,'PlotHoldStyle',false);
2 66 elseif(strcmp(opt_hold_state, 'all'))
2 67 set(fig,'NextPlot','add');
2 68 set(ax,'NextPlot','add');
2 69 setappdata(ax,'PlotHoldStyle',true);
70 else
71 error('MATLAB:hold:UnknownOption', 'Unknown command option.');
72 end