function plot_axs1

% Determine what is to be plotted.
psh = get(findobj('tag','cb5'),'value');
pd1 = get(findobj('tag','cb6'),'value');
pd2 = get(findobj('tag','cb7'),'value');
prd1 = get(findobj('tag','cb10'),'value');
prd2 = get(findobj('tag','cb11'),'value');

plot_used=0;

fh2 = figure(2);
set(fh2,'Position', [300 300 600 600])

% Plot Shim Data
if psh == 1
        if isempty(get(findobj('tag','tx79'),'string'))
            msgbox('No Shim Data Loaded','Warning');
        else
            shim_pts=evalin('base','shim_pts');
            scatter3(shim_pts(1,1),shim_pts(1,2),shim_pts(1,3),20,'k','o','filled');
            hold on
            scatter3(shim_pts((2:end),1),shim_pts((2:end),2),shim_pts((2:end),3),20,'r','o','filled');
            xlabel('X')
            ylabel('Y')
            zlabel('Z')
            plot_used=1;  
        end
end

% Plot 1st Set of Excel Data
if pd1 == 1
        if isempty(get(findobj('tag','tx2'),'string'))
           msgbox('Data File 1 Not Loaded','Warning'); 
        else
            data1 = evalin('base','data1');
            if plot_used == 1
                hold on
            end
            scatter3(data1(:,1),data1(:,2),data1(:,3),20,'k','o');
            xlabel('X')
            ylabel('Y')
            zlabel('Z')
            plot_used=1;
        end
end

% Plot 2nd Set of Excel Data 
if pd2 == 1
        if isempty(get(findobj('tag','tx3'),'string'))
            msgbox('Data File 2 Not Loaded','Warning');
        else   
            data2 = evalin('base','data2');
            if plot_used == 1
                  hold on
            end
            scatter3(data2(:,1),data2(:,2),data2(:,3),20,'g','o');
            xlabel('X')
            ylabel('Y')
            zlabel('Z')
        end
end
% Plot Re-Aligned Data 1.
if prd1 == 1
        if isempty(get(findobj('tag','tx2'),'string'))
           msgbox('Data File 1 Not Loaded','Warning'); 
        else
            rdata1 = evalin('base','rdata1');
            if plot_used == 1
                hold on
            end
            scatter3(rdata1(:,1),rdata1(:,2),rdata1(:,3),20,'y','+');
            xlabel('X')
            ylabel('Y')
            zlabel('Z')            
            plot_used=1;
        end
end

% Plot Re-Aligned Data 2.
if prd2 == 1
        if isempty(get(findobj('tag','tx3'),'string'))
            msgbox('Data File 2 Not Loaded','Warning');
        else   
            rdata2 = evalin('base','rdata2');
            if plot_used == 1
                  hold on
            end
            scatter3(rdata2(:,1),rdata2(:,2),rdata2(:,3),20,'m','+');
            xlabel('X')
            ylabel('Y')
            zlabel('Z')            
        end
end

if plot_used >0
    hold off
end
    


