This is a static copy of a profile report

Home

title (Calls: 10, Time: 0.478 s)
Generated 16-Jul-2020 17:08:46 using performance time.
function in file /Applications/MATLAB_R2020a.app/toolbox/matlab/graph2d/title.m
Copy to new window for comparing multiple runs

Parents (calling functions)

Function NameFunction TypeCalls
hhsave_VFI_3OCfunction10
Lines where the most time was spent

Line NumberCodeCallsTotal Time% TimeTime Plot
63
h = get(ax,'Title');
100.457 s95.6%
65
set(h, 'String', string, pvpai...
100.008 s1.6%
22
isaxarr=matlab.graphics.chart....
100.005 s1.0%
28
[ax,args,nargs] = labelcheck('...
100.002 s0.5%
62
matlab.graphics.internal.markF...
100.002 s0.4%
All other lines  0.004 s0.9%
Totals  0.478 s100% 
Children (called functions)

Function NameFunction TypeCallsTotal Time% TimeTime Plot
...Manager>AxesLayoutManager.doUpdateclass method80.265 s55.5%
Legend.autoUpdateCallbackfunction80.106 s22.2%
...nteractions.createDefaultInteractionsclass method100.009 s2.0%
Legend.Legend>Legend.getBackgroundColorclass method80.005 s1.0%
objArrayDispatchfunction100.004 s0.8%
Legend.attachAxesListeners>safeMarkDirtynested function80.002 s0.4%
graph2d/private/labelcheckfunction100.002 s0.4%
markFigurefunction100.001 s0.3%
...>@(obj,evd)(hObj.MarkDirty('all'))anonymous function80.001 s0.2%
convertStringToCharArgsfunction100.001 s0.2%
...ractions.createAndRegisterTextControlclass method100.001 s0.1%
Self time (built-ins, overhead, etc.)  0.081 s16.9%
Totals  0.478 s100% 
Code Analyzer results
No Code Analyzer messages.
Coverage results
Show coverage for parent directory
Total lines in function71
Non-code lines (comments, blank lines)34
Code lines (lines that can run)37
Code lines that did run26
Code lines that did not run11
Coverage (did run/can run)70.27 %
Function listing
time 
Calls 
 line
   1 
function hh = title(varargin)
   2 
%TITLE  Graph title.
   3 
%   TITLE('text') adds text at the top of the current axis.
   4 
%
   5 
%   TITLE('text','Property1',PropertyValue1,'Property2',PropertyValue2,...)
   6 
%   sets the values of the specified properties of the title.
   7 
%
   8 
%   TITLE(AX,...) adds the title to the specified axes.
   9 
%
  10 
%   H = TITLE(...) returns the handle to the text object used as the title.
  11 
%
  12 
%   See also XLABEL, YLABEL, ZLABEL, TEXT.
  13 

  14 
%   Copyright 1984-2019 The MathWorks, Inc.
  15 

  16 
% if the input has a title property which is a text object, use it to set
  17 
% the title on.
  18 

< 0.001 
     10 
  19
if nargout>0 
  20 
    [isaxarr,hh]=matlab.graphics.chart.internal.objArrayDispatch(@title,varargin{:});
< 0.001 
     10 
  21
else 
  0.005 
     10 
  22
    isaxarr=matlab.graphics.chart.internal.objArrayDispatch(@title,varargin{:}); 
< 0.001 
     10 
  23
end 
< 0.001 
     10 
  24
if isaxarr 
  25 
    return
< 0.001 
     10 
  26
end 
  27 

  0.002 
     10 
  28
[ax,args,nargs] = labelcheck('Title',varargin); 
  29 

< 0.001 
     10 
  30
if nargs == 0 || (nargs > 1 && (rem(nargs-1,2) ~= 0)) 
  31 
  error(message('MATLAB:title:InvalidNumberOfInputs'))
< 0.001 
     10 
  32
end 
  33 

< 0.001 
     10 
  34
if isempty(ax) 
< 0.001 
     10 
  35
    ax = gca; 
  36 
    % Chart subclass support
  37 
    % Invoke title method with same number of outputs to defer output arg
  38 
    % error handling to the method.
< 0.001 
     10 
  39
    if isa(ax,'matlab.graphics.chart.Chart') 
  40 
        if(nargout == 1)
  41 
            hh = title(ax,args{:});
  42 
        else
  43 
            title(ax,args{:});
  44 
        end
  45 
        return
< 0.001 
     10 
  46
    end 
< 0.001 
     10 
  47
end 
  48 

< 0.001 
     10 
  49
string = args{1}; 
< 0.001 
     10 
  50
if isempty(string), string=''; end 
< 0.001 
     10 
  51
pvpairs = args(2:end); 
  52 

  53 
% get-set does not support strings as of now
  0.001 
     10 
  54
pvpairs = matlab.graphics.internal.convertStringToCharArgs(pvpairs); 
  55 

  56 
%---Check for bypass option
< 0.001 
     10 
  57
if isappdata(ax,'MWBYPASS_title')        
  58 
   h = mwbypass(ax,'MWBYPASS_title',string,pvpairs{:});
  59 

  60 
%---Standard behavior      
< 0.001 
     10 
  61
else 
  0.002 
     10 
  62
   matlab.graphics.internal.markFigure(ax); 
  0.457 
     10 
  63
   h = get(ax,'Title'); 
  64 

  0.008 
     10 
  65
   set(h, 'String', string, pvpairs{:}); 
  66 
      
< 0.001 
     10 
  67
end 
  68 

< 0.001 
     10 
  69
if nargout > 0 
  70 
  hh = h;
< 0.001 
     10 
  71
end 

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