This is a static copy of a profile report

Home

scribe/private/getplotmanager (677 calls, 0.022 sec)
Generated 05-Aug-2011 13:02:24 using cpu time.
function in file /usr/local/MATLAB/R2011a/toolbox/matlab/scribe/private/getplotmanager.m
Copy to new window for comparing multiple runs

Parents (calling functions)

Function NameFunction TypeCalls
graph2dhelperfunction677
Lines where the most time was spent

Line NumberCodeCallsTotal Time% TimeTime Plot
28
if nargin==1 && strcmp...
6770.011 s50.0%
25
if ~ishandle(pm)
6770.011 s50.0%
30
return
6770 s0%
29
h = pm;
6770 s0%
23
persistent pm;
6770 s0%
All other lines  0 s0%
Totals  0.022 s100% 
Children (called functions)
No children
Code Analyzer results
No Code Analyzer messages.
Coverage results
[ Show coverage for parent directory ]
Total lines in function35
Non-code lines (comments, blank lines)22
Code lines (lines that can run)13
Code lines that did run6
Code lines that did not run7
Coverage (did run/can run)46.15 %
Function listing
   time   calls  line
1 function h = getplotmanager(peekflag)
2 % This internal helper function may be removed in a future release.
3
4 % Copyright 2010 The MathWorks, Inc.
5
6 % H = GETPLOTMANAGER
7 % With no arguments, returns the singleton plotmanager. If no plotmanager
8 % was previously created, one will be created.
9 %
10 % H = GETPLOTMANAGER('-peek')
11 % The '-peek' flag by-passes plotmanager creation so that no plotmanager
12 % objects is implicitly created. This syntax will return an
13 % empty output if no plotmanager object was previously instantiated.
14 %
15 % The following example adds a listener to the plotmanager singleton
16 % which is updates in response to selection of a graphic object in any
17 % figure
18 %
19 % plotmgr = feval(graph2dhelper('getplotmanager'));
20 % li = handle.listener(plotmgr,'PlotSelectionChange',@(es,ed) disp(ed));
21
677 22 mlock;
677 23 persistent pm;
24
0.01 677 25 if ~ishandle(pm)
26 pm = [];
27 end
0.01 677 28 if nargin==1 && strcmp(peekflag,'-peek')
677 29 h = pm;
677 30 return
31 end
32 if isempty(pm)
33 pm = graphics.plotmanager;
34 end
35 h = pm;