function rescatter(data,displayAxis,label,graphColor,refresh);
% This function redraws the scatter plot
% Kevin Baggett
% 31 Jul 2001 11:31:42 
% Inputs: data - data to be plotted
%         displayAxis - axis where data will be plotted    
%         label - structure containing axis labels
%         graph Color
%         refresh - refresh flag
% Outputs: none

h1=guidata(1);

[nrow,ncol]=size(data.x);
x=reshape(data.x,1,nrow*ncol);
y=reshape(data.y,1,nrow*ncol);
axes(displayAxis);

if nargin < 5 % no refresh flag
    hold on;
else
    cla;
end

plot(x,y,graphColor);
%set the marker (points) size to smallest it can be (0.5)
b=get(gca,'Children');
for i=1:length(b)
	try
		set(b(i),'MarkerSize',0.5);
	catch
	end
end
%position labels - problem with the Sun for some reason
a=xlabel(label{1});
b=ylabel(label{2});
set(a,'Units','pixels');
pos=get(a,'Position');
pos=[pos(1); -20; pos(3)];
set(a,'Position',pos);

set(b,'Units','pixels');
set(b,'Position',[-20; 120; 0]);
