load('Figure4Data.mat');

% CLL: ds_0/dt against s_0
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
figure(1)
set(gcf,'Position',[0 0 240 240],'Color','w');
semilogx(s_for_CLL,dsdt_E_is_0pt01,'k-');
hold on
semilogx(s_for_CLL,dsdt_E_is_0pt1,'k-');
semilogx(s_for_CLL,dsdt_E_is_1,'k-');
semilogx(s_for_CLL,dsdt_E_is_small,'k--','LineWidth',2);
axis([1e-1 1e5 -2 2]);
ax = gca;
ax.XTickMode = 'manual';
ax.YTickMode = 'manual';
ax.XMinorTick = 'off';
ax.YMinorTick = 'off';
ax.XTick = [1e-1,1e0,1e1,1e2,1e3,1e4,1e5];
ax.YTick = [-2.0,-1.5,-1.0,-0.5,0,0.5,1.0,1.5,2.0];
ax.XMinorGrid = 'off';
ax.YMinorGrid = 'off';
grid on;
xlabel('$\widehat{s}_0$','fontsize',12,'Interpreter','Latex')
ylabel('$\mathrm{d}\widehat{s}_0/\mathrm{d}\widehat{t}$','fontsize',12,'Interpreter','Latex')
AnnotationText1 = annotation('textbox', [0.5,0.6,0.1,0.1],...
                        'String','$\mathcal{E}$ increasing',...
                                 'Interpreter','Latex','LineStyle','none');
AnnotationArrow1 = annotation('arrow',[0.49 0.49],[0.7 0.6],...
                        'HeadStyle','vback3','HeadWidth',5,'HeadLength',5);                             
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

% Evolution: s_0 against t
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
figure(2);
set(gcf,'Position',[0 0 240 240],'Color','w');
plot(t_Vstar_is_0pt5,s_Vstar_is_0pt5,'k-')
hold on;
plot(1,se_pts(1),'k.','MarkerSize',10)
plot(t_Vstar_is_1,s_Vstar_is_1,'k-')
plot(1,se_pts(2),'k.','MarkerSize',10)
plot(t_Vstar_is_2,s_Vstar_is_2,'k-')
plot(1,se_pts(3),'k.','MarkerSize',10)
plot(t_Vstar_is_5,s_Vstar_is_5,'k-')
plot(1,se_pts(4),'k.','MarkerSize',10)
axis([0 1 0 2])
ax = gca;
ax.XTickMode = 'manual';
ax.YTickMode = 'manual';
ax.XMinorTick = 'off';
ax.YMinorTick = 'off';
ax.XTick = [0,0.2,0.4,0.6,0.8,1];
ax.YTick = [0,0.5,1,1.5,2];
ax.XMinorGrid = 'off';
ax.YMinorGrid = 'off';
grid on;
xlabel('$\widehat{t}$','fontsize',12,'Interpreter','Latex')
ylabel('$\widehat{s}_0(\widehat{t}\,)$','fontsize',12,'Interpreter','Latex')
AnnotationText2 = annotation('textbox', [0.54,0.28,0.1,0.1],...
                        'String','$V_*$ increasing',...
                                 'Interpreter','Latex','LineStyle','none');
AnnotationArrow2 = annotation('arrow',[0.53 0.53],[0.29 0.39],...
                        'HeadStyle','vback3','HeadWidth',5,'HeadLength',5);   
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

% Steady-state value: s_e against Vstar
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
figure(3)
set(gcf,'Position',[0 0 240 240],'Color','w');
plot(Vstar_E_is_0pt01,se,'k-');
hold on;
plot(Vstar_E_is_0pt1,se,'k-');
plot(Vstar_E_is_1,se,'k-');
plot(Vstar_E_is_10,se,'k-');
plot(Vstar_E_is_small,se,'k--','LineWidth',2);
plot(Vstar_pts,se_pts,'k.','MarkerSize',10);
axis([0 10 0 2.5]);
ax = gca;
ax.XTickMode = 'manual';
ax.YTickMode = 'manual';
ax.XMinorTick = 'off';
ax.YMinorTick = 'off';
ax.XTick = [0,2,4,6,8,10];
ax.YTick = [0,0.5,1,1.5,2,2.5];
ax.XMinorGrid = 'off';
ax.YMinorGrid = 'off';
grid on;
xlabel('$V_*$','fontsize',12,'Interpreter','Latex')
ylabel('$s_e = \mathcal{S}(V_*)$','fontsize',12,'Interpreter','Latex')
AnnotationText3 = annotation('textbox', [0.55,0.37,0.1,0.1],...
                        'String','$\mathcal{E}$ increasing',...
                                 'Interpreter','Latex','LineStyle','none');
AnnotationArrow3 = annotation('arrow',[0.5 0.6],[0.45 0.35],...
                        'HeadStyle','vback3','HeadWidth',5,'HeadLength',5);
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%