function A = set(A, varargin)
%AXISOBJ/SET

%   Copyright (c) 1984-98 by The MathWorks, Inc.
%   $Revision: 1.5 $  $Date: 1998/07/01 03:01:21 $  

if nargin == 3
   switch varargin{1}
   case 'ZoomScale'
      A.ZoomScale = varargin{2};
   case 'Offset'
      A = LSetOffset(A, varargin{2});
   otherwise
      HGObj = A.scribehgobj;
      A.scribehgobj = set(HGObj, varargin{:});
   end
else
   HGObj = A.scribehgobj;
   A.scribehgobj = set(HGObj, varargin{:});
end



function A = LSetOffset(A,initialPosition)
savedState.iPoints = 1;
fig = get(A,'Figure');
oldUnits = get(fig,'Units');
set(fig,'Units',get(A,'Units'));
initialPosition = get(fig,'CurrentPoint');
set(fig,'Units',oldUnits);
pos = get(A,'Position');

savedState.OffsetX = initialPosition(1)-pos(1);
savedState.OffsetY = initialPosition(2)-pos(2);
savedState.DragConstraint = '';
HGObj = A.scribehgobj;
A.scribehgobj = set(HGObj, 'SavedState', savedState);
