Code covered by the BSD License  

Highlights from
cfaxisset

cfaxisset

by

 

24 Jul 2004 (Updated )

Set axis property of figure Curve Fitting Toolbox.

cfaxisset(varargin)
function cfaxisset(varargin)
% CFAXISSET    Set curve fitting figure axis properties
%   CFAXISSET('PropertyName1',PropertyValue1,'PropertyName2',PropertyValue2,...);
%   PropertyName and PropertyValue are the same as SET;
%
%   Example:
%       cfaxisset('YScale','log');
%       cfaxisset('XGrid','on');
%
%   See also SET
%
%   Copyright 2004 Zhang Jiang
%   $Revision: 1.0 $  $Date: 2004/07/20 23:44:08 $

figureHandle = findall(0,'Tag','Curve Fitting Figure');
if isempty(figureHandle)
    error('No curve fitting figure opened');
    return;
else
    set(figureHandle,'HandleVisibility','on');
    axesHandle = findobj(figureHandle,'type','axes');
end

if nargin == 0 | mod(nargin,2) == 1
    set(figureHandle,'HandleVisibility','callback');
    error('Wrong input arguments.');
else
    setText = ['set(axesHandle'];
    for iNargin = 1:2:nargin
        setText = [setText,',''',num2str(varargin{iNargin}),''',''',...
            num2str(varargin{iNargin+1}),''''];
    end
    setText = [setText,')'];
    try
        eval(setText);
        set(figureHandle,'HandleVisibility','callback');
    catch
        set(figureHandle,'HandleVisibility','callback');
        error('Wrong input arguments.');
    end
end

Contact us