This is a static copy of a profile report

Home

cla (Calls: 12, Time: 0.052 s)
Generated 16-Jul-2020 17:08:45 using performance time.
function in file /Applications/MATLAB_R2020a.app/toolbox/matlab/graphics/cla.m
Copy to new window for comparing multiple runs

Parents (calling functions)

Function NameFunction TypeCalls
newplot>ObserveAxesNextPlotsubfunction12
Lines where the most time was spent

Line NumberCodeCallsTotal Time% TimeTime Plot
52
clo(ax, extra{:});
120.038 s74.0%
49
claNotify(ax,extra{:});
120.009 s18.3%
24
[varargin{:}] = convertStrings...
120.001 s1.5%
28
(isscalar(varargin{1}) &&a...
120.001 s1.0%
29
(isgraphics(varargin{1},'axes'...
120.000 s0.9%
All other lines  0.002 s4.2%
Totals  0.052 s100% 
Children (called functions)

Function NameFunction TypeCallsTotal Time% TimeTime Plot
graphics/private/clofunction120.037 s71.5%
graphics/private/claNotifyfunction120.009 s16.7%
Self time (built-ins, overhead, etc.)  0.006 s11.8%
Totals  0.052 s100% 
Code Analyzer results
No Code Analyzer messages.
Coverage results
Show coverage for parent directory
Total lines in function60
Non-code lines (comments, blank lines)34
Code lines (lines that can run)26
Code lines that did run17
Code lines that did not run9
Coverage (did run/can run)65.38 %
Function listing
time 
Calls 
 line
   1 
function ret_ax = cla(varargin)
   2 
%CLA Clear current axes.
   3 
%   CLA deletes all children of the current axes with visible handles and resets
   4 
%   the current axes ColorOrder and LineStyleOrder.
   5 
%
   6 
%   CLA RESET deletes all objects (including ones with hidden handles)
   7 
%   and also resets all axes properties, except Position and Units, to
   8 
%   their default values.
   9 
%
  10 
%   CLA(AX) or CLA(AX,'reset') clears the single axes with handle AX.
  11 
%
  12 
%   See also CLF, RESET, HOLD.
  13 

  14 
%   CLA(..., HSAVE) deletes all children except those specified in
  15 
%   HSAVE.
  16 

  17 
%   Copyright 1984-2018 The MathWorks, Inc.
  18 

  19 
% Check for an Axes handle.
  20 
% 'isgraphics' will catch numeric graphics handles, but will not catch
  21 
% deleted graphics handles, so we need to check for both separately.
  22 

< 0.001 
     12 
  23
if nargin > 0 
< 0.001 
     12 
  24
    [varargin{:}] = convertStringsToChars(varargin{:}); 
< 0.001 
     12 
  25
end 
  26 

  0.001 
     12 
  27
if nargin > 0 && (... 
     12 
  28
        (isscalar(varargin{1}) && ... 
     12 
  29
        (isgraphics(varargin{1},'axes') || isgraphics(varargin{1},'polaraxes'))) ... 
  30 
        || isa(varargin{1},'matlab.graphics.axis.AbstractAxes'))
  31 
    % If first argument is an axes handle
< 0.001 
     12 
  32
    ax = varargin{1}; 
< 0.001 
     12 
  33
    extra = varargin(2:end); 
  34 
else
  35 
    % Default target is current axes
  36 
    ax = gca;
  37 
    extra = varargin;
< 0.001 
     12 
  38
end 
  39 

  40 
% Check to make sure we have a valid scalar axes handle.
  41 
% Empty array of axes handles is a no-op.
  42 
% Vector of axes or deleted axes is an error.
< 0.001 
     12 
  43
if isa(ax,'matlab.graphics.chart.Chart') 
  44 
    error(message('MATLAB:Chart:UnsupportedConvenienceFunction', 'cla', ax.Type));
< 0.001 
     12 
  45
elseif isa(ax, 'matlab.ui.control.UIAxes') 
  46 
    cla(ax, extra{:});
< 0.001 
     12 
  47
elseif isscalar(ax) && isgraphics(ax)  
  48 
    % Call claNotify to trigger cla related evants.
  0.009 
     12 
  49
    claNotify(ax,extra{:}); 
  50 

  51 
    % Call clo on the axes
  0.038 
     12 
  52
    clo(ax, extra{:}); 
  53 
elseif ~isempty(ax)
  54 
    error(message('MATLAB:cla:InvalidAxesHandle'));
< 0.001 
     12 
  55
end 
  56 

  57 
% Return the axes handle if requested
< 0.001 
     12 
  58
if (nargout ~= 0) 
  59 
    ret_ax = ax;
< 0.001 
     12 
  60
end 

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