function data = harray_data(par,data)

% harray_data - harray data get and set
% -------------------------------------
%
% data = harray_data(par,data)
%
% Input:
% ------
%  par - parent figure handle
% 
% Output:
% -------
%  data - harray data structure

%--------------------------------
% Author: Harold Figueroa
%--------------------------------
% $Revision: 976 $
% $Date: 2005-04-25 19:27:22 -0400 (Mon, 25 Apr 2005) $
%--------------------------------

%--
% set default figure
%--

if (nargin < 1)
	par = gcf;
end

%--
% try to find support axes
%--

ax = findobj(par,'tag','HARRAY_BASE_AXES');

if (isempty(ax))
	data = []; return;
end 

%--
% get or set data
%--

if (nargin < 2)
	data = get(ax,'userdata');
else
	set(ax,'userdata',data);
end

