clear
load Figure4_Data.mat
fs=10;

close all
figure
set(gcf,'unit','centimeters','position',[10,2,20,18])

% (a)
ha1=axes('position',[0.045,0.7,0.223,0.3],'fontsize',fs,'fontname','Times New Roman');
set(gcf,'currentaxes',ha1)

yyaxis right
plot(1:12,sm_126.*1e-12,'Linewidth',1.2,'color',cmp1(4,:)./255,'linestyle','-')
hold on
plot(1:12,sm_126.*1e-12,'color',cmp1(4,:)./255,'linestyle','none','marker','.','markersize',12)
% plot(1:12,sm_585.*1e-12,'linewidth',1.2,'color',[95/255,179/255,208/255])
ylim([-12 0])
xlim([0 13])
set(gca,'fontsize',fs,'tickdir','out','YColor',cmp1(4,:)./255,'fontname','Times New Roman')
set(gca,'ytick',[-12:3:0],'yticklabel',{})
set(gca,'YDir','reverse')

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'},'fontname','Times New Roman')
set(gca,'ytick',[-1:3],'yticklabel',{-1:3},'fontname','Times New Roman')
% % 虚线改实线
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)
ha2=axes('position',[0.29,0.7,0.2,0.3],'fontsize',fs,'fontname','Times New Roman');
set(gcf,'currentaxes',ha2)

yyaxis right
plot(1:12,sm_245.*1e-12,'linewidth',1.2,'color',cmp1(4,:)./255,'linestyle','-')
hold on
plot(1:12,sm_245.*1e-12,'color',cmp1(4,:)./255,'linestyle','none','marker','.','markersize',12)
ylim([-12 0]) 
xlim([0 13])
set(gca,'fontsize',fs,'tickdir','out','YColor',cmp1(4,:)./255,'fontname','Times New Roman')
set(gca,'ytick',[-12:3:0],'yticklabel',{}) 
set(gca,'YDir','reverse')

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'},'fontname','Times New Roman')
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)
ha3=axes('position',[0.507,0.7,0.2,0.3],'fontsize',fs,'fontname','Times New Roman');
set(gcf,'currentaxes',ha3)

yyaxis right
plot(1:12,sm_370.*1e-12,'Linewidth',1.2,'color',cmp1(4,:)./255,'linestyle','-')
hold on
plot(1:12,sm_370.*1e-12,'color',cmp1(4,:)./255,'linestyle','none','marker','.','markersize',12)
ylim([-12 0]) 
xlim([0 13])
set(gca,'fontsize',fs,'tickdir','out','YColor',cmp1(4,:)./255,'fontname','Times New Roman')
set(gca,'ytick',[-12:3:0],'yticklabel',{}) 
set(gca,'YDir','reverse')

yyaxis left
h = boxplot(mi_370','colors',myc1,'Symbol','+k','widths',0.5);
set(h,'Linewidth',1.2);
xlabel('Month','fontsize',fs,'fontname','Times New Roman');
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'},'fontname','Times New Roman')
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)
ha4=axes('position',[0.72,0.7,0.21,0.3],'fontsize',fs,'fontname','Times New Roman');
set(gcf,'currentaxes',ha4)

yyaxis right
plot(1:12,sm_585.*1e-12,'Linewidth',1.2,'color',cmp1(4,:)./255,'linestyle','-')
hold on
plot(1:12,sm_585.*1e-12,'color',cmp1(4,:)./255,'linestyle','none','marker','.','markersize',12)
ylim([-12 0]) 
xlim([0 13])
set(gca,'fontsize',fs,'tickdir','out','YColor',cmp1(4,:)./255,'fontname','Times New Roman')
set(gca,'ytick',[-12:3:0],'yticklabel',{-12:3:0}) 
ylabel('Sea ice area change (10^6 km^2)','fontname','Times New Roman');
set(gca,'YDir','reverse')

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'},'fontname','Times New Roman')
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) SSP 126 Warm Season
ha5=axes('position',[0.066,0.37,0.16,0.25],'fontsize',fs,'fontname','Times New Roman');
set(gcf,'currentaxes',ha5);
hold on
for i=1:length(modelname)
    if i<13
        plot(a_126w(i),ma_126w(i),'.','MarkerSize',24,...
            'MarkerEdgeColor',myc(i,:)./255)
    else
        plot(a_126w(i),ma_126w(i),'s','markersize',7,...
            'MarkerEdgeColor',myc(i-12,:)./255,'MarkerFaceColor',myc(i-12,:)./255)
    end
end
ylabel('MHW mean intensity change (\circC)','fontsize',fs,'fontname','Times New Roman');
set(gca,'fontsize',fs,'tickdir','out','fontname','Times New Roman')
xlim([-9 1])
ylim([-0.5 2]) 
set(gca,'ytick',[-0.5:0.5:2],'yticklabel',{-0.5:0.5:2},'fontname','Times New Roman')
set(gca,'xtick',[-9:2:-1,1],'xticklabel',[])
title('(e) SSP126','fontsize',fs,'fontname','Times New Roman')
box on
set(gca,'XDir','reverse')

n=1;
for i=1:18
    if a_126w(i)~=-15
    ma1(n)=ma_126w(i);
    a1(n)=a_126w(i);
    n=n+1;
    else
        continue
    end
end

b=a1;
mb=ma1; 
[ta,indta]=sort(b);
tb=mb(indta);
pp=polyfit(ta,tb,1); 
hold on
x=-10:1:2;
y=pp(1,1).*x+pp(1,2);
hold on
plot(x,y,'r-','linewidth',1.2)

[RHO,PVAL] = corr(a1',ma1','type','spearman')
text(0.5,1.65,'r = -0.81','fontsize',fs,'fontname','Times New Roman');
text(0.5,1.48,'p < 0.01','fontsize',fs,'fontname','Times New Roman');  % summertime
text(0.5,1.85,'Warm season','fontsize',fs,'fontname','Times New Roman');
hold off

% (j) SSP 126 Cold season
ha6=axes('position',[0.066,0.07,0.16,0.25],'fontsize',fs,'fontname','Times New Roman');
set(gcf,'currentaxes',ha6);
hold on
for i=1:length(modelname)
    if i<13
        plot(a_126c(i),ma_126c(i),'.','MarkerSize',24,...
            'MarkerEdgeColor',myc(i,:)./255)
    else
        plot(a_126c(i),ma_126c(i),'s','markersize',7,...
            'MarkerEdgeColor',myc(i-12,:)./255,'MarkerFaceColor',myc(i-12,:)./255)
    end
end
ylabel('MHW mean intensity change (\circC)','fontsize',fs);
set(gca,'fontsize',fs,'tickdir','out','fontname','Times New Roman')
xlim([-9 1])
ylim([-0.5 2]) 
set(gca,'xtick',[-9:2:-1,1],'xticklabel',{-9:2:-1,1},'fontname','Times New Roman')
set(gca,'ytick',[-0.5:0.5:2],'yticklabel',{-0.5:0.5:2},'fontname','Times New Roman')
title('(j) SSP126','fontsize',fs,'fontname','Times New Roman')
box on
set(gca,'XDir','reverse')

n=1;
for i=1:18
    if a_126c(i)~=-15
    ma1(n)=ma_126c(i);
    a1(n)=a_126c(i);
    n=n+1;
    else
        continue
    end
end

b=a1;
mb=ma1; 
[ta,indta]=sort(b);
tb=mb(indta);
pp=polyfit(ta,tb,1); 
hold on
x=-10:1:2;
y=pp(1,1).*x+pp(1,2);
hold on
plot(x,y,'r-','linewidth',1.2)

[RHO,PVAL] = corr(a1',ma1','type','spearman')
text(0.5,1.65,'r = -0.63','fontsize',fs,'fontname','Times New Roman');
text(0.5,1.48,'p < 0.01','fontsize',fs,'fontname','Times New Roman');  % wintertime
text(0.5,1.85,'Cold season','fontsize',fs,'fontname','Times New Roman');

% (f) SSP 245 Warm Season
ha7=axes('position',[0.242,0.37,0.16,0.25],'fontsize',fs,'fontname','Times New Roman');
set(gcf,'currentaxes',ha7);
hold on
for i=1:length(modelname)
    if i<13
        plot(a_245w(i),ma_245w(i),'.','MarkerSize',24,...
            'MarkerEdgeColor',myc(i,:)./255)
    else
        plot(a_245w(i),ma_245w(i),'s','markersize',7,...
            'MarkerEdgeColor',myc(i-12,:)./255,'MarkerFaceColor',myc(i-12,:)./255)
    end
end
set(gca,'fontsize',fs,'tickdir','out')
xlim([-9 1])
ylim([-0.5 2])
set(gca,'ytick',[-0.5:0.5:2],'yticklabel',[])
set(gca,'xtick',[-9:2:-1,1],'xticklabel',[])
title('(f) SSP245','fontsize',fs)
box on
set(gca,'XDir','reverse')

n=1;
for i=1:18 
    if a_245w(i)~=-15
    ma1(n)=ma_245w(i);
    a1(n)=a_245w(i);
    n=n+1;
    else
        continue
    end
end

b=a1; 
mb=ma1; 
[ta,indta]=sort(b);
tb=mb(indta);
pp=polyfit(ta,tb,1); 
hold on
x=-10:1:2;
y=pp(1,1).*x+pp(1,2);
hold on
plot(x,y,'r-','linewidth',1.2)

[RHO,PVAL] = corr(a1',ma1','type','spearman')
text(0.5,1.65,'r = -0.76','fontsize',fs,'fontname','Times New Roman');
text(0.5,1.48,'p < 0.01','fontsize',fs,'fontname','Times New Roman');  % summertime
text(0.5,1.85,'Warm season','fontsize',fs,'fontname','Times New Roman');

% (k) SSP 245 Cold season
ha8=axes('position',[0.242,0.07,0.16,0.25],'fontsize',fs,'fontname','Times New Roman');
set(gcf,'currentaxes',ha8);
hold on
for i=1:length(modelname)
    if i<13
        plot(a_245c(i),ma_245c(i),'.','MarkerSize',24,...
            'MarkerEdgeColor',myc(i,:)./255)
    else
        plot(a_245c(i),ma_245c(i),'s','markersize',7,...
            'MarkerEdgeColor',myc(i-12,:)./255,'MarkerFaceColor',myc(i-12,:)./255)
    end
end
set(gca,'fontsize',fs,'tickdir','out')
xlim([-9 1])
ylim([-0.5 2]) 
set(gca,'xtick',[-9:2:-1,1],'xticklabel',{'-9','-7','-5','-3','-1','1'},'fontname','Times New Roman')
set(gca,'ytick',[-0.5:0.5:2],'yticklabel',[])
title('(k) SSP245','fontsize',fs)
box on
set(gca,'XDir','reverse')

n=1;
for i=1:18 
    if a_245c(i)~=-15
    ma1(n)=ma_245c(i);
    a1(n)=a_245c(i);
    n=n+1;
    else
        continue
    end
end

b=a1; 
mb=ma1; 
[ta,indta]=sort(b);
tb=mb(indta);
pp=polyfit(ta,tb,1); 
hold on
x=-10:1:2;
y=pp(1,1).*x+pp(1,2);
hold on
plot(x,y,'r-','linewidth',1.2)

[RHO,PVAL] = corr(a1',ma1','type','spearman')
text(0.5,1.65,'r = -0.60','fontsize',fs,'fontname','Times New Roman');
text(0.5,1.48,'p < 0.05','fontsize',fs,'fontname','Times New Roman');  % summertime
text(0.5,1.85,'Cold season','fontsize',fs,'fontname','Times New Roman');

% (g) SSP 370 Warm Season
ha9=axes('position',[0.418,0.37,0.16,0.25],'fontsize',fs,'fontname','Times New Roman');
set(gcf,'currentaxes',ha9);
hold on
for i=1:length(modelname)
    if i<13
        plot(a_370w(i),ma_370w(i),'.','MarkerSize',24,...
            'MarkerEdgeColor',myc(i,:)./255)
    else
        plot(a_370w(i),ma_370w(i),'s','markersize',7,...
            'MarkerEdgeColor',myc(i-12,:)./255,'MarkerFaceColor',myc(i-12,:)./255)
    end
end
set(gca,'fontsize',fs,'tickdir','out','fontname','Times New Roman')
xlim([-9 1])
ylim([-0.5 2]) 
set(gca,'ytick',[-0.5:0.5:2],'yticklabel',[])
set(gca,'xtick',[-9:2:-1,1],'xticklabel',[])
title('(g) SSP370','fontsize',fs,'fontname','Times New Roman')
box on
set(gca,'XDir','reverse')

n=1;
for i=1:18 
    if a_370w(i)~=-15
    ma1(n)=ma_370w(i);
    a1(n)=a_370w(i);
    n=n+1;
    else
        continue
    end
end

b=a1;
mb=ma1; 
[ta,indta]=sort(b);
tb=mb(indta);
pp=polyfit(ta,tb,1); 
hold on
x=-10:1:2;
y=pp(1,1).*x+pp(1,2);
hold on
plot(x,y,'r-','linewidth',1.2)

[RHO,PVAL] = corr(a1',ma1','type','spearman')
text(0.5,1.65,'r = -0.73','fontsize',fs,'fontname','Times New Roman');
text(0.5,1.48,'p < 0.01','fontsize',fs,'fontname','Times New Roman');  % summertime
text(0.5,1.85,'Warm season','fontsize',fs,'fontname','Times New Roman');

% (k) SSP 370 Cold season
ha10=axes('position',[0.418,0.07,0.16,0.25],'fontsize',fs,'fontname','Times New Roman');
set(gcf,'currentaxes',ha10);
hold on
for i=1:length(modelname)
    if i<13
        plot(a_370c(i),ma_370c(i),'.','MarkerSize',24,...
            'MarkerEdgeColor',myc(i,:)./255)
    else
        plot(a_370c(i),ma_370c(i),'s','markersize',7,...
            'MarkerEdgeColor',myc(i-12,:)./255,'MarkerFaceColor',myc(i-12,:)./255)
    end
end
set(gca,'fontsize',fs,'tickdir','out','fontname','Times New Roman')
xlim([-9 1])
ylim([-0.5 2]) 
set(gca,'xtick',[-9:2:-1,1],'xticklabel',{'-9','-7','-5','-3','-1','1'})
set(gca,'ytick',[-0.5:0.5:2],'yticklabel',[])
title('(l) SSP370','fontsize',fs,'fontname','Times New Roman')
box on
set(gca,'XDir','reverse')

n=1;
for i=1:18 
    if a_370c(i)~=-15
    ma1(n)=ma_370c(i);
    a1(n)=a_370c(i);
    n=n+1;
    else
        continue
    end
end

b=a1; 
mb=ma1; 
[ta,indta]=sort(b);
b=a1; 
mb=ma1; 
tb=mb(indta);
pp=polyfit(ta,tb,1); 
hold on
x=-10:1:2;
y=pp(1,1).*x+pp(1,2);
hold on
plot(x,y,'r-','linewidth',1.2)

[RHO,PVAL] = corr(a1',ma1','type','spearman')
text(0.5,1.65,'r = -0.68','fontsize',fs,'fontname','Times New Roman');
text(0.5,1.48,'p < 0.01','fontsize',fs,'fontname','Times New Roman');  % summertime
text(0.5,1.85,'Cold season','fontsize',fs,'fontname','Times New Roman');

% (h) SSP 585 Warm Season
ha11=axes('position',[0.594,0.37,0.16,0.25],'fontsize',fs,'fontname','Times New Roman');
set(gcf,'currentaxes',ha11);
hold on
for i=1:length(modelname)
    if i<13
        plot(a_585w(i),ma_585w(i),'.','MarkerSize',24,...
            'MarkerEdgeColor',myc(i,:)./255)
    else
        plot(a_585w(i),ma_585w(i),'s','markersize',7,...
            'MarkerEdgeColor',myc(i-12,:)./255,'MarkerFaceColor',myc(i-12,:)./255)
    end
end
set(gca,'fontsize',fs,'tickdir','out','fontname','Times New Roman')
xlim([-9 1])
ylim([-0.5 2]) 
set(gca,'ytick',[-0.5:0.5:2],'yticklabel',[])
set(gca,'xtick',[-9:2:-1,1],'xticklabel',[])
title('(h) SSP585','fontsize',fs,'fontname','Times New Roman')
box on
set(gca,'XDir','reverse')

n=1;
for i=1:18 
    if a_585w(i)~=-15
    ma1(n)=ma_585w(i);
    a1(n)=a_585w(i);
    n=n+1;
    else
        continue
    end
end

b=a1; 
mb=ma1; 
[ta,indta]=sort(b);
b=a1; 
mb=ma1; 
tb=mb(indta);
pp=polyfit(ta,tb,1); 
hold on
x=-10:1:2;
y=pp(1,1).*x+pp(1,2);
hold on
plot(x,y,'r-','linewidth',1.2)

[RHO,PVAL] = corr(a1',ma1','type','spearman')
text(0.5,1.65,'r = -0.59','fontsize',fs,'fontname','Times New Roman');
text(0.5,1.48,'p < 0.05','fontsize',fs,'fontname','Times New Roman');  % summertime
text(0.5,1.85,'Warm season','fontsize',fs,'fontname','Times New Roman');

% (i) SSP 585 MAM
ha13=axes('position',[0.77,0.37,0.16,0.25],'fontsize',fs,'fontname','Times New Roman');
set(gcf,'currentaxes',ha13);
hold on
for i=1:length(modelname)
    if i<13
        plot(a_585mam(i),ma_585mam(i),'.','MarkerSize',24,...
            'MarkerEdgeColor',myc(i,:)./255)
    else
        plot(a_585mam(i),ma_585mam(i),'s','markersize',7,...
            'MarkerEdgeColor',myc(i-12,:)./255,'MarkerFaceColor',myc(i-12,:)./255)
    end
end
set(gca,'fontsize',fs,'tickdir','out','fontname','Times New Roman')
xlim([-9 1])
ylim([-0.5 2]) 
set(gca,'xtick',[-9:2:-1,1],'xticklabel',{-9:2:-1,1})
set(gca,'ytick',[-0.5:0.5:2],'yticklabel',[])
title('(i) SSP585','fontsize',fs,'fontname','Times New Roman')
box on
set(gca,'XDir','reverse')

n=1;
for i=1:18 
    if a_585mam(i)~=-15
    ma1(n)=ma_585mam(i);
    a1(n)=a_585mam(i);
    n=n+1;
    else
        continue
    end
end

b=a1;
mb=ma1; 
[ta,indta]=sort(b);
b=a1;
mb=ma1; 
tb=mb(indta);
pp=polyfit(ta,tb,1); 
hold on
x=-10:1:2;
y=pp(1,1).*x+pp(1,2);
hold on
plot(x,y,'r-','linewidth',1.2)

[RHO,PVAL] = corr(a1',ma1','type','spearman')
text(0.5,1.65,'r = -0.70','fontsize',fs,'fontname','Times New Roman');
text(0.5,1.48,'p < 0.01','fontsize',fs,'fontname','Times New Roman');  % wintertime
text(0.5,1.85,'March-May','fontsize',fs,'fontname','Times New Roman');


% legend
ha12=axes('position',[0.65,0.04,0.28,0.3],'fontsize',fs,'fontname','Times New Roman');
set(gcf,'currentaxes',ha12);
hold on
for i=1:length(modelname)
    if i<13
        plot(a_585mam(i).*0.1-1,ma_585mam(i).*0.1,'.','MarkerSize',24,...
            'MarkerEdgeColor',myc(i,:)./255)
    else
        plot(a_585mam(i).*0.1-1,ma_585mam(i).*0.1,'s','markersize',7,...
            'MarkerEdgeColor',myc(i-12,:)./255,'MarkerFaceColor',myc(i-12,:)./255)
    end
end
xlim([-1 1.5])
ylim([-0.5 1]) 

% modelname={'ACCESS-CM2','AWI-CM-1-1-MR','BCC-CSM2-MR',...
%     'CESM2-WACCM','CNRM-CM6-1-HR','CNRM-ESM2-1',...
%     'EC-Earth3','EC-Earth3-Veg','EC-Earth3-Veg-LR','FIO-ESM-2-0',...
%     'IPSL-CM6A-LR','MIROC6','MPI-ESM1-2-HR',...
%     'MPI-ESM1-2-LR','MRI-ESM2-0','NESM3',...
%     'NorESM2-LM','NorESM2-MM'};
legend(ha12,modelname,'Location','northeastoutside','fontsize',fs-3);
legend('boxoff')

axis off ; 

% (m) SSP 585 Cold season
ha12=axes('position',[0.594,0.07,0.16,0.25],'fontsize',fs,'fontname','Times New Roman');
set(gcf,'currentaxes',ha12);
hold on
for i=1:length(modelname)
    if i<13
        plot(a_585c(i),ma_585c(i),'.','MarkerSize',24,...
            'MarkerEdgeColor',myc(i,:)./255)
    else
        plot(a_585c(i),ma_585c(i),'s','markersize',7,...
            'MarkerEdgeColor',myc(i-12,:)./255,'MarkerFaceColor',myc(i-12,:)./255)
    end
end
set(gca,'fontsize',fs,'tickdir','out','fontname','Times New Roman')
xlim([-9 1])
ylim([-0.5 2]) 
set(gca,'xtick',[-9:2:-1,1],'xticklabel',{'-9','-7','-5','-3','-1','1'})
set(gca,'ytick',[-0.5:0.5:2],'yticklabel',[])
title('(m) SSP585','fontsize',fs,'fontname','Times New Roman')
box on
set(gca,'XDir','reverse')

n=1;
for i=1:18 
    if a_585c(i)~=-15
    ma1(n)=ma_585c(i);
    a1(n)=a_585c(i);
    n=n+1;
    else
        continue
    end
end

b=a1;
mb=ma1; 
[ta,indta]=sort(b);
b=a1; 
mb=ma1; 
tb=mb(indta);
pp=polyfit(ta,tb,1); 
hold on
x=-10:1:2;
y=pp(1,1).*x+pp(1,2);
hold on
plot(x,y,'r-','linewidth',1.2)

[RHO,PVAL] = corr(a1',ma1','type','spearman')
text(0.5,1.65,'r = -0.56','fontsize',fs,'fontname','Times New Roman');
text(0.5,1.48,'p < 0.05','fontsize',fs,'fontname','Times New Roman');  % wintertime
text(0.5,1.85,'Cold season','fontsize',fs,'fontname','Times New Roman');


% xlabel
text(13.6,-0.97,'Sea ice area change (10^6km^2)','fontsize',fs,'fontname','Times New Roman')

print(gcf,'-dpdf','-r600','D:\data_code_figures\figures\Figure4.pdf')