function plot_regr(x,y,varargin)

% PLOT_REGR plots a simple regression of y on x with appropriate
% graphic properties

% INPUTS:    x = vector of explanatory data
%            y = vector of dependent data
%     varargin = optional vector of axes labels
%
%     example: plot_regr(x,y,'x-variable','y-variable')
%
% Written by: T.E.SMITH, 12/30/99              
%

plot(x,y,'o','LineWidth',2.5,'MarkerSize',3)

title('REGRESSION LINE','FontName','Times','FontSize',14,...
   'FontWeight','bold')

if nargin > 2 
   
   if length(varargin) == 2
      
   	xlabel(varargin{1},'FontName','Times','FontSize',14,...
   	'FontWeight','bold')

      
      ylabel(varargin{2},'FontName','Times','FontSize',14,...
   	'FontWeight','bold')

      
   else
      
      error('Wrong Number of Axis Labels')
      
   end
   
elseif nargin == 2
   
   z = 1; % junk statement
   
else
  
   error('Wrong Number of Input Variables')
   
end

lsline

h = lsline;

set(h,'Color','r','LineWidth',2)
