function plot_lhd(params, data)
%plot_lhd(params, data)
%
%  Description:
%
%    This function will plot the 2-D projection of the Dakota sampling 
%    study design.  Use readtabular.m to read the Dakota tabular results
%    file from the study.
%
%  Inputs:
%
%    params   = a cell vector with the parameter labels
%    data     = an array of parameter/reponse data from the study
%
%  Outputs:
%
%    2-D projection plot of the sampling design.
%
%  Contact:
%
%    Bob Cochran
%    Applied CHT
%    rjc@heattransfer.org
%
%  History:
%
%    Who    Date   Version  Note
%    ---  -------- -------  -----------------------------------------------
%    RJC  05/23/17  0.1.0   Initial release.
%
%==========================================================================

nvars = length(params);
pdata = data(:,1:nvars);

figure
[H,AX,BigAx,P,PAx] = plotmatrix(pdata,pdata);
title('Sampling Design 2-D Projection Plot')

for vi = 1:nvars,
  for vj = 1:nvars,
    subplot(AX(vj,vi));
    axis tight
    if (vj == nvars)
      xlabel(params{vi})
    end
    if (vi == 1)
      ylabel(params{vj})
    end
  end
end
