function [pid, pt] = plotHtDiff(fname, varargin)
% function [pid, pt] = plotHtDiff(fname, [scale], [elimPtFile])
% 
% read data from specified file, and plot height differences onto
% regional basemap; activates tooltip window to describe
% point information (PID, lat/lon, etc)
% 
% required inputs:
%   fname         vector file name (specify path relative to pwd)
% optional inputs:
%   scale         scale factor for vectors (default: 1)
%   elimPtFile    file containing PIDs for eliminated points
% outputs:
%   pid           name of points (PIDs)
%   pt            dimensions (#PID x 4)
%                   1-2 lat/long (deg)
%                   3   azimuth (deg)
%                   4   vector length (m)


%close all; % close all open windows
VERTCONpath; % supplement path with toolboxes needed for VERTCON

% read datafile
[p,f,s] = fileparts(fname);
C = strsplit(f,'.');
if strcmp(C{1},'work')
    [piddat,pt] = readWorkfile(fname);
    pid = piddat{1};
else
    % assume it is a vector file
    [pid,pt] = readVectfile(fname);
end

% set the region
region = C{4}
% if length(C)==5
%     region = C{end-1};
% else
%     region = C{end};
% end

[pid,pt] = replotHtDiff(pid, pt, region);
%[pid,pt] = replotHtDiff(pid, pt, region, varargin{:});

%title(strrep(strrep(fname,'\','\\'),'_','\_'));
title(strrep(strrep(f,'\','\\'),'_','\_'));

return;
