function vpsend(hvpfig,haxes,hlegax,hvpdataax,hvplegax)
%
%  Name: vpsend
% 
%  Usage: vpsend(haxes,hlegax,hvpdataax,hvplegax)
% 
%   Description:
%     Sends the current plot and legend to the 
%       comparitive viewport window
%

%
%  Version SWD970902
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% This matlab source code was originally     %
% developed as part of "DIAMOND" at          %
% Los Alamos National Laboratory. It may     %
% be copied, modified, and distributed in    %
% any form, provided:                        %
%  a) This notice accompanies the files and  %
%     appears near the top of all source     %
%     code files.                            %
%  b) No payment or commercial services are  %
%     received in exchange for the code.     %
%                                            %
% Original copyright is reserved by the      %
% Regents of the University of California,   %
% in addition to Scott W. Doebling, Phillip  %
% J. Cornwell, Erik G. Straser, and Charles  %
% R. Farrar.                                 %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

delete(get(hvpdataax,'children'))

delete(get(hvplegax,'children'))

%  Make a copy of all objects in haxes into hvpdataax

copyobj(flipud(get(haxes,'children')),hvpdataax);

%  Reduce line style size to 1.5 pixel

hlinetemp = findobj(hvpdataax,'type','line');
set(hlinetemp,'linewidth',1.5)

%  Set properties of hvpdataax

set(hvpdataax,'view',get(haxes,'view'))
axes(hvpdataax)
axis on
axis equal
rotate3d on

htexttemp = findobj(hvpdataax,'type','text');

set(htexttemp,'fontsize',8)

%  Make a copy of all objects in hlegax into hvplegax

copyobj(get(hlegax,'children'),hvplegax);

%  Reduce legend line style size to 1.5 pixel

hlinetemp = findobj(hvplegax,'type','line');
set(hlinetemp,'linewidth',1.5)

%  Set properties of hvpdataax

axes(hvplegax)
axis on

%  Make the viewport visible

set(hvpfig,'visible','on')

%  ALL DONE

return
