%Simu Study Main T distribution
%% Setting
clear;
% load('GlobalSetting');
% nr=setting(1); % num of r
% rstep=setting(2);
nr=35;
rstep=0.1;


%% Modeling
load('pathmatrix');  %load the model simulation parameters matrix

cn=35;  %#of ponit to consider


%#####################
%plot
% Create figure
figure1 = figure;
% Create axes
axes1 = axes('Parent',figure1,'YGrid','on','XGrid','on',...
    'XTick',0:1:nr,...
    'XTickLabel',0:rstep:nr*rstep);
% Uncomment the following line to preserve the X-limits of the axes
%xlim(axes1,[0 20.3]);
% Uncomment the following line to preserve the Y-limits of the axes
%ylim(axes1,[0 1]);
box(axes1,'on');
hold(axes1,'all');

% Create multiple lines using matrix input to plot
%plot0=boxplot(plotdata(:,1:nr2),'Parent',axes1,'labels',(0+rstep):rstep:nr2*rstep,'symbol','+','Colors',[0 0 0]);

plotpath=[path(1:cn,6),path(1:cn,11:12)];
plot1 = plot(plotpath,'Parent',axes1,'LineWidth',1,'Color',[0 0 0]);
set(plot1(1),'Marker','.','DisplayName','Estimate Ridge Path SUR');
% set(plot1(2),'Marker','o','DisplayName','Estimate Ridge Path SMR');
% set(plot1(3),'Marker','*','DisplayName','New CI');
%set(plot1(3),'Marker','*','DisplayName','Bonferroni''s z type CI');
% set(plot1(4),'Marker','*','DisplayName',' ');
set(plot1(2),'Marker','>','DisplayName','Proposed CI df=2');
set(plot1(3),'Marker','>','DisplayName',' ');
%set(plot1(7),'Marker','<','DisplayName','Proposed CI df=4');
%set(plot1(8),'Marker','<','DisplayName',' ');

set(gca,'XTick',0:1:nr,'XTickLabel',0:rstep:nr*rstep);
%set(gca,'YTick',0:1:1.05,'YTickLabel',0:0.1:1);
% Create xlabel
xlabel('Radius');

% Create ylabel
ylabel('Max Desirability');

% Create legend
%legend1=legend([plot1(1),plot1(5),simuplot(1)],'Estimated Ridge Path','Proposed CI','Simulated Ridage Path');
legend1=legend([plot1(1),plot1(2)],'Ridge Path (SUR)','Proposed CI');
%legend1=legend([plot1(1),plot1(2),plot1(3),plot1(5),plot1(7),simuplot(1)],'Ridge Path (SUR)','Ridge Path (SMR)','Bonferroni z type','Proposed CI (v_h=2)','Proposed CI (v_h=k)','Simulated Ridage Path');
%legend1=legend([plot1(1),plot1(4),simuplot(1)],'Ridge Path','Proposed CI','Simulated Ridage Path');
%legend1=legend([plot1(1),plot1(2),plot1(4)],'Ridge Path','Bonferroni z type','Proposed CI');
set(legend1,'Position',[0.2 0.7 0.2 0.15]);

hold off