function Value = getDisplayUnits(this,WhichCoord)
% Return units for a particular coordinate axis

%   Author: A. Stothert
%   Copyright 1986-2004 The MathWorks, Inc. 
%   $Revision: 1.1.6.1 $ $Date: 2004/12/10 19:31:02 $

errmsg = '';
%Check which coordinates units we are getting
switch lower(WhichCoord)
   case 'xunits'
      Units = 'xDisplayUnits';
   case 'yunits'
      Units = 'yDisplayUnits';
   otherwise
      errmsg = sprintf('Can not identify ''%s'' display unit to update',WhichCoord);
end

if isempty(errmsg)
   %No errors, get the units value
   Value = this.(Units);
else
   error(errmsg);
end