function shim_hist_plot


% Runs with Shim Thickness GUI.
% Created by Mark Smith
% 12/7/07

% Function reads GUI selection and Generates Histogram Plots.

% Revised 2/28/08 to accomodate changes for new shim labels.


joint_type = evalin('base','joint_type');
th         = evalin('base','thickness');
labels     = evalin('base','labels');

switch joint_type
    
    case 'AA'
        fh1 = gcf;
        set(fh1,'Position',[300 300 550 550])
        h1 = axes('Position',[0 0 1 1],'Visible','off');
        h2 = axes('Position',[.25 .1 .7 .8]);
        hist(th)
        title('Histogram: AA Shim Thicknesses','fontsize',8)
        xlabel('inches','fontsize',8)
        ylabel('# of shims','fontsize',8)
        set(gcf,'CurrentAxes',h1)
        text(.025,0.94,'Shim Thickness (inches)','FontSize',8)
        temp1 = strcat(labels,'=',num2str(th));
        text(.065,.645,temp1,'FontSize',8);
        
    case 'AB'
        fh1 = gcf;
        set(fh1,'Position',[300 300 550 550])
        h1 = axes('Position',[0 0 1 1],'Visible','off');
        h2 = axes('Position',[.25 .1 .7 .8]);
        hist(th)
        title('Histogram: AB Shim Thicknesses','fontsize',8)
        xlabel('inches','fontsize',8)
        ylabel('# of shims','fontsize',8)
        set(gcf,'CurrentAxes',h1)
        text(.025,0.975,'Shim Thickness (inches)','FontSize',8)
        temp1 = strcat(labels,'=',num2str(th));
        text(.065,.5,temp1,'FontSize',8);
        
    case 'BC'
        fh1 = gcf;
        set(fh1,'Position',[300 300 550 550])
        h1 = axes('Position',[0 0 1 1],'Visible','off');
        h2 = axes('Position',[.25 .1 .7 .8]);
        hist(th)
        title('Histogram: BC Shim Thicknesses','fontsize',8)
        xlabel('inches','fontsize',8)
        ylabel('# of shims','fontsize',8)
        set(gcf,'CurrentAxes',h1)
        text(.025,0.975,'Shim Thickness (inches)','FontSize',8)
        temp1 = strcat(labels,'=',num2str(th));
        text(.065,.5,temp1,'FontSize',8);
        
end


