www.gusucode.com > mbctools 工具箱 matlab 源码程序 > mbctools/+mbcmodelview/@OutlierLine/OutlierLine.m

    classdef (CaseInsensitiveProperties,TruncatedProperties) OutlierLine < handle & matlab.mixin.Copyable
    %xregGui.outlierline class

    %  Copyright 2005-2015 The MathWorks, Inc. and Ford Global Technologies, Inc.
    
    properties (AbortSet, SetObservable)
        %OUTLIERINDICES indices to points selected as outliers
        OutlierIndices = [];
        %ALTCLICKCALLBACK right click callback
        AltClickCallback = [];
        %MARKER Marker symbol for outlier line
        Marker = 'o';
        %COLOR Marker color for outlier line
        Color = 'r';
        %MARKERSIZE marker size for outlier line
        MarkerSize = 10;
        %LINEWIDTH line widthe for outlier line
        LineWidth = 1.5;
        
    end
    
    
    properties(SetAccess=private)
        %DATASIZE Property is of type 'mxArray'
        DataSize = [];
    end
    properties(Access=private)
        %LINEHANDLES Property is of type 'mxArray'
        LineHandles = gobjects( 0 );
        %LINEPARENTS Property is of type 'mxArray'
        LineParents = gobjects( 0 );
        %OUTLIERLINES Property is of type 'mxArray'
        OutlierLines = gobjects( 0 );
        
        %POINT Property is of type 'mxArray'
        Point = [];
        %BD Property is of type 'mxArray'
        BD = [];
        %BD_INDX Property is of type 'mxArray'
        BD_indx = [];
        
        %XLIMMODE store of axes XLimMode while mult-selecting
        XLimMode = '';
        %YLIMMODE store of axes YLimMode while mult-selecting
        YLimMode = '';
        %XTICKMODE store of axes XTickMode while mult-selecting
        XTickMode = '';
        %YTICKMODE store of axes YTickMode while mult-selecting
        YTickMode = '';
        %MMANAGER motion manager for use while mult-seleting
        MManager = [];
    end
    
    properties (Access=private, AbortSet)
        %L_LINEDESTROYED Property is of type 'mxArray'
        L_LineDestroyed = {  };
        %L_DATACHANGING Property is of type 'mxArray'
        L_DataChanging = {  };
    end
    
    methods  % constructor block
        function obj = OutlierLine(hnd)
        % OUTLIERLINE/CONSTRUCTOR
        %   Usage:
        %   L=OUTLIERLINE(lineHandle)
        %   L=OUTLIERLINE([lineHandles])
        %   L=OUTLIERLINE([lineHandles],'Property1',Value1,...)
        %
        
        lineHandles=[];
        dataSize=0;
        
        if nargin
            % check we've got line handles
            lineHandles = isLineHandle(obj, hnd);
            if ~isempty(lineHandles)
                % check all lines have data the same length
                dataSize = length( get(lineHandles(1),'XData') );
                lineHandles = isLineHandle(obj, lineHandles, dataSize);
            else
                warning(message('mbc:xregGui:outlierline:InvalidHandle'));
            end
        end
        
        % apply args and default properties
        obj.DataSize = dataSize;
        obj.AltClickCallback = '';
        
        % Install a listener for the Marker properties
        
        if  ~isempty(lineHandles)
            % add the input line handles to the outlierline
            add(obj,lineHandles);
        end
        end  % outlierline
        
    end  % constructor block
    
    methods
        
        function set.Marker(obj,val)
        obj.Marker = val;
        redraw(obj)
        end
        
        function set.Color(obj,val)
        obj.Color = val;
        redraw(obj)
        end
        
        function set.MarkerSize(obj,val)
        obj.MarkerSize = val;
        redraw(obj)
        end
        
        function set.LineWidth(obj,val)
        obj.LineWidth = val;
        redraw(obj)
        end
        
        function set.OutlierIndices(obj,val)
        obj.OutlierIndices = val;
        redraw(obj)
        end
        
    end   % set and get functions
    
    methods  % public methods
        add(obj,newH)
        clear(obj)
        click(OL,lineH)
        dataResize(obj,hnd)
        value = get(obj,property)
        out = isLineHandle(obj,inputH,dataSize)
        multiselect(oL)
        redraw(obj)
        remove(obj,hnds)
        set(obj,varargin)
    end  % public methods
    
end  % classdef