function setscale(RespObj,Property,Value)
%SETSCALE  Set scale properties of RespObj axes
%          (frequencyscale, magnitudescale)

%   Author(s): A. DiVergilio
%   Copyright 1986-2000 The MathWorks, Inc. 
%   $Revision: 1.6 $  $Date: 2000/06/14 20:07:32 $

pa = RespObj.PlotAxes;

switch lower(Property)
case 'frequencyscale'
   switch RespObj.ResponseType
   case {'bode','bodemag','margin','sigma'}
      set(pa,'XScale',Value);
      %---Set to manual first to force listeners to trigger
      set(RespObj,'XlimMode','manual');
      set(RespObj,'XlimMode','auto');
   end
case 'magnitudescale'
   switch RespObj.ResponseType
   case {'bodemag','nichols','sigma'}
      set(pa,'YScale',Value);
      set(RespObj,'YlimMode','auto');
   case {'bode','margin'}
      set(pa(1:2:end-1),'YScale',Value);
      %---Set to manual first to force listeners to trigger
      set(RespObj,'YlimMode','manual');
      set(RespObj,'YlimMode','auto');
   end
end
