% NOTE - BiPlot for Statistics example not available in Octave


function PlotData(num, X, V, Y, PC, vbls, data, map)

fig3 = figure('Color',[1 1 1]); 
if num == 1    
 % Plot for Statistics example
 plot(X(1,:), X(2,:),'.', 'MarkerSize', 30)
 xlabel('Height (in)')
 ylabel('Weight (lbs)')
 
elseif num == 2 
    % BiPlot for Statistics example
    % NOTE - Biplot in MATLAB unavailable in Octave - changed to regular plot
    %Y = Y';
    %biplot(V,'scores',Y(:,1:PC), 'MarkerSize', 20,'varlabels',vbls)

elseif num == 3
    % Plot for Image Compression example
    image(X),colormap(map), axis off, axis equal; % display results

elseif num == 4
    % Plot for Neuroscience Cluster
    plot(Y(1,:), Y(2,:),'.', 'MarkerSize', 20), axis([-400, 200, -200, 200])
    xlabel('Component 1 ', 'FontSize', 10)
    ylabel('Component 2 ', 'FontSize', 10)
     
elseif num == 5
     % Plot for Principal Component Action Potentials
     time = linspace(-0.5, 0.5, 64);
     mu = mean(data,2);
     pot1 = mu + 110*V(:,1) - 25*V(:,2);
     pot2 = mu - 260*V(:,1) - 10*V(:,2);
     plot(time, pot1 , time,  pot2, '--r')
     xlabel('Times (ms)','Interpreter','latex')
     ylabel('Potential ($\mu$V)','Interpreter','latex')
     legend('Cluster #1', 'Cluster #2')

 
end

figureHandle = gcf;
%%% make all text in the figure to size 16 and bold
set(findall(figureHandle,'type','text'),'fontSize',16,'fontWeight','bold')