This is a static copy of a profile report

Home

newplot (47 calls, 0.031 sec)
Generated 15-Mar-2007 12:01:48 using real time.
M-function in file C:\Program Files\MATLAB71\toolbox\matlab\graphics\newplot.m
[Copy to new window for comparing multiple runs]

Parents (calling functions)

Function NameFunction TypeCalls
imuitools\private\basicImageDisplayM-function1
imshowM-function1
see_mind_picM-function2
see_mind_domM-function4
see_mindM-function37
blinktxtM-function2
Lines where the most time was spent

Line NumberCodeCallsTotal Time% TimeTime Plot
64
fig = ObserveFigureNextPlot(fi...
470.016 s49.7%
53
elseif strcmp(get(obj,'type'),...
30.016 s49.7%
40
hsave = [];
460.000 s0.4%
45
fig = [];
470.000 s0.1%
46
ax = [];
470.000 s0.1%
Other lines & overhead  0 s0%
Totals  0.031 s100% 
Children (called functions)

Function NameFunction TypeCallsTotal Time% TimeTime Plot
newplot>ObserveFigureNextPlotM-subfunction470.016 s49.7%
gcfM-function460 s0%
gcaM-function460 s0%
newplot>ObserveAxesNextPlotM-subfunction470 s0%
Self time (built-ins, overhead, etc.)  0.016 s49.7%
Totals  0.031 s100% 
M-Lint results
Line numberMessage
39Use || instead of | as the OR operator in (scalar) conditional statements.
41Use || instead of | as the OR operator in (scalar) conditional statements.
Coverage results
[ Show coverage for parent directory ]
Total lines in file80
Non-code lines (comments, blank lines)48
Code lines (lines that can run)32
Code lines that did run28
Code lines that did not run4
Coverage (did run/can run)87.50 %
Function listing
   time   calls  line
1 function axReturn = newplot(hsave)
2 %NEWPLOT M-file preamble for NextPlot property.
3 % NEWPLOT prepares figure, axes for graphics according to NextPlot.
4 % H = NEWPLOT returns the handle of the prepared axes.
5 % H = NEWPLOT(HSAVE) prepares and returns an axes, but does not
6 % delete any objects whose handles appear in HSAVE. If HSAVE is
7 % specified, the figure and axes containing HSAVE are prepared
8 % instead of the current axes of the current figure. If HSAVE is
9 % empty, NEWPLOT behaves as if it were called without any inputs.
10 %
11 % NEWPLOT is a standard preamble command that is put at
12 % the beginning of graphics M-file functions that draw graphs
13 % using only low-level object creation commands. NEWPLOT
14 % "does the right thing" in terms of determining which axes and/or
15 % figure to draw the plot in, based upon the setting of the
16 % NextPlot property of axes and figure objects, and returns a
17 % handle to the appropriate axes.
18 %
19 % The "right thing" is:
20 %
21 % First, prepare a figure for graphics:
22 % Clear and reset the current figure using CLF RESET if its NextPlot
23 % is 'replace', or clear the current figure using CLF if its
24 % NextPlot is 'replacechildren', or reuse the current figure as-is
25 % if its NextPlot is 'add', or if no figures exist, create a figure.
26 % When the figure is prepared, set its NextPlot to 'add', and then
27 % prepare an axes in that figure:
28 % Clear and reset the current axes using CLA RESET if its NextPlot
29 % is 'replace', or clear the current axes using CLA if its NextPlot
30 % is 'replacechildren', or reuse the current axes as-is if its
31 % NextPlot is 'add', or if no axes exist, create an axes.
32 %
33 % See also HOLD, ISHOLD, FIGURE, AXES, CLA, CLF.
34
35 % Copyright 1984-2004 The MathWorks, Inc.
36 % $Revision: 5.13.6.4 $ $Date: 2004/08/16 01:47:16 $
37 % Built-in function.
38
47 39 if nargin == 0 | isempty(hsave)
< 0.01 46 40 hsave = [];
1 41 elseif length(hsave) ~= 1 | ~ishandle(hsave)
42 error('bad handle')
43 end
44
< 0.01 47 45 fig = [];
< 0.01 47 46 ax = [];
47
47 48 if ~isempty(hsave)
< 0.01 1 49 obj = hsave;
1 50 while ~isempty(obj)
4 51 if strcmp(get(obj,'type'),'figure')
< 0.01 1 52 fig = obj;
0.02 3 53 elseif strcmp(get(obj,'type'),'axes')
< 0.01 1 54 ax = obj;
1 55 end
4 56 obj = get(obj,'parent');
4 57 end
1 58 end
59
47 60 if isempty(fig)
46 61 fig = gcf;
46 62 end
63
0.02 47 64 fig = ObserveFigureNextPlot(fig, hsave);
65 % for clay
47 66 set(fig,'nextplot','add');
67
47 68 if isempty(ax)
46 69 ax = gca(fig);
1 70 elseif ~ishandle(ax)
71 error('axis parent deleted')
72 end
73
47 74 ax = ObserveAxesNextPlot(ax, hsave);
75
< 0.01 47 76 if nargout
< 0.01 46 77 axReturn = ax;
< 0.01 46 78 end
79
80

Other subfunctions in this file are not included in this listing.