function [pid, pt] = plotVectors(fname, varargin)
% function [pid, pt] = plotVectors(fname, [scale], [elimPtFile])
% 
% read data from specified file, and plot vectors 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
%test
NADCONpath % supplement path with toolboxes needed for NADCON

% read datafile
[pid,pt] = readVectorFile(fname);
% pt = [lat lon azim_in_deg vector_length_in_meters];

% set the region
C = strsplit(fname,'.');
% Dru - force it to be 6 here...
region = C{6};
%if length(C)==5
%    region = C{end-1};
%else
%    region = C{end};
%end

%fprintf 'Dru, inside of plotVectors, here is region: ';
%disp(region);

[pid,pt] = replotVectors(pid, pt, region, varargin{:});
%title(fname);
%title(strrep(strrep(fname,'\','\\'),'_','\_'));
% set vector scale
scl = 1;
if (nargin>1 & ~isempty(varargin{1}))
    scl = varargin{1};
end
title([strrep(strrep(fname,'\','\\'),'_','\_') ' scl=' num2str(scl)]);

return
