clear
load SFigure10_Data.mat

fs=10;

close all

figure
set(gcf,'unit','centimeters','position',[10,2,20,12])

% (a) SSP126
ha1=axes('position',[0.046,0.55,0.223,0.4],'fontsize',fs,'fontname','Times New Roman');
set(gcf,'currentaxes',ha1)

yyaxis right
plot(1:12,sm_126,'Linewidth',1.2,'color',cmp1(4,:)./255,'linestyle','-')
hold on
plot(1:12,sm_126,'color',cmp1(4,:)./255,'linestyle','none','marker','.','markersize',12)
ylim([-25 75]) 
xlim([0 13])
set(gca,'fontsize',fs,'tickdir','out','YColor',cmp1(4,:)./255,'fontname','Times New Roman')
set(gca,'ytick',[-25:25:75],'yticklabel',{},'fontname','Times New Roman')  

yyaxis left
h = boxplot(mi_126','colors',myc1,'Symbol','+k','widths',0.5);
set(h,'Linewidth',1.2);
xlabel('Month','fontsize',fs,'fontname','Times New Roman');
ylabel('MHW mean intensity change (\circC)','fontsize',fs,'fontname','Times New Roman');
title('(a) SSP126','fontsize',fs,'fontname','Times New Roman');
set(gca,'fontsize',fs,'tickdir','out','YColor',cmp1(end-4,:)./255,'fontname','Times New Roman')
xlim([0 13])
ylim([-1 3])  
set(gca,'xtick',[1:12],'xticklabel',{'J','F','M','A','M','J','J','A','S','O','N','D'})
set(gca,'ytick',[-1:3],'yticklabel',{-1:3})  
boxobj=findobj(gca,'Tag','Box');
LW=findobj(gca,'Tag','Lower Whisker');
UW=findobj(gca,'Tag','Upper Whisker');
for j=1:length(boxobj)
   LW(j).LineStyle='-'; 
   UW(j).LineStyle='-'; 
end
grid on


% (b) SSP245
ha2=axes('position',[0.29,0.55,0.2,0.4],'fontsize',fs,'fontname','Times New Roman');
set(gcf,'currentaxes',ha2)

yyaxis right
plot(1:12,sm_245,'Linewidth',1.2,'color',cmp1(4,:)./255,'linestyle','-')
hold on
plot(1:12,sm_245,'color',cmp1(4,:)./255,'linestyle','none','marker','.','markersize',12)
ylim([-25 75]) 
xlim([0 13])
set(gca,'fontsize',fs,'tickdir','out','YColor',cmp1(4,:)./255,'fontname','Times New Roman')
set(gca,'ytick',[-25:25:75],'yticklabel',{})  

yyaxis left
h = boxplot(mi_245','colors',myc1,'Symbol','+k','widths',0.5);
set(h,'Linewidth',1.2);
xlabel('Month','fontsize',fs,'fontname','Times New Roman');
title('(b) SSP245','fontsize',fs,'fontname','Times New Roman');
set(gca,'fontsize',fs,'tickdir','out','YColor',cmp1(end-4,:)./255,'fontname','Times New Roman')
xlim([0 13])
ylim([-1 3])  
set(gca,'xtick',[1:12],'xticklabel',{'J','F','M','A','M','J','J','A','S','O','N','D'})
set(gca,'ytick',[-1:3],'yticklabel',[])  
boxobj=findobj(gca,'Tag','Box');
LW=findobj(gca,'Tag','Lower Whisker');
UW=findobj(gca,'Tag','Upper Whisker');
for j=1:length(boxobj)
   LW(j).LineStyle='-'; 
   UW(j).LineStyle='-'; 
end
grid on


% (c) SSP370
ha3=axes('position',[0.507,0.55,0.2,0.4],'fontsize',fs,'fontname','Times New Roman');
set(gcf,'currentaxes',ha3)

yyaxis right
plot(1:12,sm_370,'Linewidth',1.2,'color',cmp1(4,:)./255,'linestyle','-')
hold on
plot(1:12,sm_370,'color',cmp1(4,:)./255,'linestyle','none','marker','.','markersize',12)
ylim([-25 75]) 
xlim([0 13])
set(gca,'fontsize',fs,'tickdir','out','YColor',cmp1(4,:)./255,'fontname','Times New Roman')
set(gca,'ytick',[-25:25:75],'yticklabel',{})  

yyaxis left
h = boxplot(mi_370','colors',myc1,'Symbol','+k','widths',0.5);
set(h,'Linewidth',1.2);
xlabel('Month','fontsize',fs);
title('(c) SSP370','fontsize',fs,'fontname','Times New Roman');
set(gca,'fontsize',fs,'tickdir','out','YColor',cmp1(end-4,:)./255,'fontname','Times New Roman')
xlim([0 13])
ylim([-1 3])  
set(gca,'xtick',[1:12],'xticklabel',{'J','F','M','A','M','J','J','A','S','O','N','D'})
set(gca,'ytick',[-1:3],'yticklabel',[])  
boxobj=findobj(gca,'Tag','Box');
LW=findobj(gca,'Tag','Lower Whisker');
UW=findobj(gca,'Tag','Upper Whisker');
for j=1:length(boxobj)
   LW(j).LineStyle='-'; 
   UW(j).LineStyle='-'; 
end
grid on

% (d) SSP585
ha4=axes('position',[0.72,0.55,0.205,0.4],'fontsize',fs,'fontname','Times New Roman');
set(gcf,'currentaxes',ha4)

yyaxis right
plot(1:12,sm_585,'Linewidth',1.2,'color',cmp1(4,:)./255,'linestyle','-')
hold on
plot(1:12,sm_585,'color',cmp1(4,:)./255,'linestyle','none','marker','.','markersize',12)
ylim([-25 75]) 
xlim([0 13])
set(gca,'fontsize',fs,'tickdir','out','YColor',cmp1(4,:)./255,'fontname','Times New Roman')
set(gca,'ytick',[-25:25:75],'yticklabel',{-25:25:75},'fontname','Times New Roman')
ylabel('Net shortwave flux change (W¡¤m^-^2)','fontname','Times New Roman');

yyaxis left
h = boxplot(mi_585','colors',myc1,'Symbol','+k','widths',0.5);
set(h,'Linewidth',1.2);
xlabel('Month','fontsize',fs,'fontname','Times New Roman');
title('(d) SSP585','fontsize',fs,'fontname','Times New Roman');
set(gca,'fontsize',fs,'tickdir','out','YColor',cmp1(end-4,:)./255,'fontname','Times New Roman')
xlim([0 13])
ylim([-1 3])  
set(gca,'xtick',[1:12],'xticklabel',{'J','F','M','A','M','J','J','A','S','O','N','D'})
set(gca,'ytick',[-1:3],'yticklabel',[])  
boxobj=findobj(gca,'Tag','Box');
LW=findobj(gca,'Tag','Lower Whisker');
UW=findobj(gca,'Tag','Upper Whisker');
for j=1:length(boxobj)
   LW(j).LineStyle='-'; 
   UW(j).LineStyle='-'; 
end
grid on

% (e) SSP126
ha1=axes('position',[0.046,0.05,0.223,0.4],'fontsize',fs,'fontname','Times New Roman');
set(gcf,'currentaxes',ha1)

yyaxis right
plot(1:12,hf_126,'Linewidth',1.2,'color',cmp1(4,:)./255,'linestyle','-')
hold on
plot(1:12,hf_126,'color',cmp1(4,:)./255,'linestyle','none','marker','.','markersize',12)
ylim([-90 90]) 
xlim([0 13])
set(gca,'fontsize',fs,'tickdir','out','YColor',cmp1(4,:)./255,'fontname','Times New Roman')
set(gca,'ytick',[-90:45:90],'yticklabel',{},'fontname','Times New Roman')  

yyaxis left
h = boxplot(mi_126','colors',myc1,'Symbol','+k','widths',0.5);
set(h,'Linewidth',1.2);
xlabel('Month','fontsize',fs,'fontname','Times New Roman');
ylabel('MHW mean intensity change (\circC)','fontsize',fs,'fontname','Times New Roman');
title('(e) SSP126','fontsize',fs,'fontname','Times New Roman');
set(gca,'fontsize',fs,'tickdir','out','YColor',cmp1(end-4,:)./255,'fontname','Times New Roman')
xlim([0 13])
ylim([-1 3])  
set(gca,'xtick',[1:12],'xticklabel',{'J','F','M','A','M','J','J','A','S','O','N','D'})
set(gca,'ytick',[-1:3],'yticklabel',{-1:3})  
boxobj=findobj(gca,'Tag','Box');
LW=findobj(gca,'Tag','Lower Whisker');
UW=findobj(gca,'Tag','Upper Whisker');
for j=1:length(boxobj)
   LW(j).LineStyle='-'; 
   UW(j).LineStyle='-'; 
end
grid on


% (f) SSP245
ha2=axes('position',[0.29,0.05,0.2,0.4],'fontsize',fs,'fontname','Times New Roman');
set(gcf,'currentaxes',ha2)

yyaxis right
plot(1:12,hf_245,'Linewidth',1.2,'color',cmp1(4,:)./255,'linestyle','-')
hold on
plot(1:12,hf_245,'color',cmp1(4,:)./255,'linestyle','none','marker','.','markersize',12)
ylim([-90 90]) 
xlim([0 13])
set(gca,'fontsize',fs,'tickdir','out','YColor',cmp1(4,:)./255,'fontname','Times New Roman')
set(gca,'ytick',[-90:45:90],'yticklabel',{})  

yyaxis left
h = boxplot(mi_245','colors',myc1,'Symbol','+k','widths',0.5);
set(h,'Linewidth',1.2);
xlabel('Month','fontsize',fs,'fontname','Times New Roman');
title('(f) SSP245','fontsize',fs,'fontname','Times New Roman');
set(gca,'fontsize',fs,'tickdir','out','YColor',cmp1(end-4,:)./255,'fontname','Times New Roman')
xlim([0 13])
ylim([-1 3])  
set(gca,'xtick',[1:12],'xticklabel',{'J','F','M','A','M','J','J','A','S','O','N','D'})
set(gca,'ytick',[-1:3],'yticklabel',[])  
boxobj=findobj(gca,'Tag','Box');
LW=findobj(gca,'Tag','Lower Whisker');
UW=findobj(gca,'Tag','Upper Whisker');
for j=1:length(boxobj)
   LW(j).LineStyle='-'; 
   UW(j).LineStyle='-'; 
end
grid on


% (g) SSP370
ha3=axes('position',[0.507,0.05,0.2,0.4],'fontsize',fs,'fontname','Times New Roman');
set(gcf,'currentaxes',ha3)

yyaxis right
plot(1:12,hf_370,'Linewidth',1.2,'color',cmp1(4,:)./255,'linestyle','-')
hold on
plot(1:12,hf_370,'color',cmp1(4,:)./255,'linestyle','none','marker','.','markersize',12)
ylim([-90 90]) 
xlim([0 13])
set(gca,'fontsize',fs,'tickdir','out','YColor',cmp1(4,:)./255,'fontname','Times New Roman')
set(gca,'ytick',[-90:45:90],'yticklabel',{})  

yyaxis left
h = boxplot(mi_370','colors',myc1,'Symbol','+k','widths',0.5);
set(h,'Linewidth',1.2);
xlabel('Month','fontsize',fs);
title('(g) SSP370','fontsize',fs,'fontname','Times New Roman');
set(gca,'fontsize',fs,'tickdir','out','YColor',cmp1(end-4,:)./255,'fontname','Times New Roman')
xlim([0 13])
ylim([-1 3])  
set(gca,'xtick',[1:12],'xticklabel',{'J','F','M','A','M','J','J','A','S','O','N','D'})
set(gca,'ytick',[-1:3],'yticklabel',[])  
boxobj=findobj(gca,'Tag','Box');
LW=findobj(gca,'Tag','Lower Whisker');
UW=findobj(gca,'Tag','Upper Whisker');
for j=1:length(boxobj)
   LW(j).LineStyle='-'; 
   UW(j).LineStyle='-'; 
end
grid on

% (h) SSP585
ha4=axes('position',[0.72,0.05,0.205,0.4],'fontsize',fs,'fontname','Times New Roman');
set(gcf,'currentaxes',ha4)

yyaxis right
plot(1:12,hf_585,'Linewidth',1.2,'color',cmp1(4,:)./255,'linestyle','-')
hold on
plot(1:12,hf_585,'color',cmp1(4,:)./255,'linestyle','none','marker','.','markersize',12)
ylim([-90 90]) 
xlim([0 13])
set(gca,'fontsize',fs,'tickdir','out','YColor',cmp1(4,:)./255,'fontname','Times New Roman')
set(gca,'ytick',[-90:45:90],'yticklabel',{-90:45:90},'fontname','Times New Roman')
ylabel('Net sea surface heat flux change (W¡¤m^-^2)','fontname','Times New Roman');

yyaxis left
h = boxplot(mi_585','colors',myc1,'Symbol','+k','widths',0.5);
set(h,'Linewidth',1.2);
xlabel('Month','fontsize',fs,'fontname','Times New Roman');
title('(h) SSP585','fontsize',fs,'fontname','Times New Roman');
set(gca,'fontsize',fs,'tickdir','out','YColor',cmp1(end-4,:)./255,'fontname','Times New Roman')
xlim([0 13])
ylim([-1 3])  
set(gca,'xtick',[1:12],'xticklabel',{'J','F','M','A','M','J','J','A','S','O','N','D'})
set(gca,'ytick',[-1:3],'yticklabel',[])  
boxobj=findobj(gca,'Tag','Box');
LW=findobj(gca,'Tag','Lower Whisker');
UW=findobj(gca,'Tag','Upper Whisker');
for j=1:length(boxobj)
   LW(j).LineStyle='-'; 
   UW(j).LineStyle='-'; 
end
grid on


print(gcf,'-dpng','-r600','D:\data_code_figures\SFigures\SFigure10.png')