clear
load Figure2_data.mat

fs=10;

close all
figure
set(gcf,'unit','centimeters','position',[10,5,20,9])

% (a) Global MHW Mean intensity [2071-2100]
ha1=axes('position',[0.045,0.64,0.29,0.325],'fontname','Times New Roman');
set(gcf,'currentaxes',ha1);
m_proj('Equidistant Cylindrical','lon',[0 360],'lat',[-80 90]);
m_contourf(Xa,Ya,MMMa,[0:0.25:5],'linestyle','none')
m_grid('linest','none','xticklabels',[],'yticklabels',[-60 -30 0 30 60 90],'fontsize',fs,'fontname','Times New Roman');
m_coast('patch',[.8 .8 .8]);
% colormap(ha1,sunshine_9lev_2/255)
colormap(sunshine_9lev_2/255)
caxis([0 5]); 
hc=colorbar('horizontal');
set(hc,'position',[0.045,.61,0.442,0.015],'Ticks',[0 1 2 3 4 5],'fontname','Times New Roman','fontsize',fs)
cbarrow('right')
title('(a) MHW [2071-2100]','fontsize',fs,'fontname','Times New Roman')

% (b) Arctic MHW Mean intensity [2071-2100]
ha2=axes('position',[0.33,0.64,0.17,0.334],'fontname','Times New Roman');
set(gcf,'currentaxes',ha2);
m_proj('stereographic','lat',90,'long',0,'radius',35,'rectbox','on');       
m_contourf(lon,lat,MMMa1,[0:0.25:5],'linestyle','none')
m_grid('linest',':','xticklabels',[],'ytick',[70 80],'yticklabels',[],'fontname','Times New Roman');
m_coast('patch',[.8 .8 .8]);
colormap(ha2,sunshine_9lev_2/255)
caxis([0 5]); 
hc=colorbar('horizontal');
set(hc,'position',[0.045,.61,0.442,0.015],'Ticks',[0 1 2 3 4 5],'fontname','Times New Roman','fontsize',fs)
cbarrow('right')
title('(b) MHW [2071-2100]','fontsize',fs,'fontname','Times New Roman')
text(-1.8,-0.76,'Mean intensity under SSP585 (\circC)','fontsize',fs,'fontname','Times New Roman')


% (e) Global THE Mean intensity [2071-2100]
ha5=axes('position',[0.045,0.14,0.29,0.325],'fontname','Times New Roman');
set(gcf,'currentaxes',ha5);
m_proj('Equidistant Cylindrical','lon',[0 360],'lat',[-80 90]);
m_contourf(Xe,Ye,MMMe,[0:0.25:5],'linestyle','none')
m_grid('linest','none','xticklabels',[],'yticklabels',[-60 -30 0 30 60 90],'fontsize',fs,'fontname','Times New Roman');
m_coast('patch',[.8 .8 .8]);
colormap(ha5,sunshine_9lev_2/255)
caxis([0 5]);
hc=colorbar('horizontal');
set(hc,'position',[0.045,.11,0.442,0.015],'Ticks',[0 1 2 3 4 5],'fontname','Times New Roman','fontsize',fs)
cbarrow('right')
title('(e) THE [2071-2100]','fontsize',fs,'fontname','Times New Roman')

% (f) Arctic THE Mean intensity [2071-2100]
ha6=axes('position',[0.33,0.14,0.17,0.334],'fontname','Times New Roman');
set(gcf,'currentaxes',ha6);
m_proj('stereographic','lat',90,'long',0,'radius',35,'rectbox','on');       
m_contourf(lon,lat,MMMe1,[0:0.25:5],'linestyle','none')
m_grid('linest',':','xticklabels',[],'ytick',[70 80],'yticklabels',[],'fontname','Times New Roman');
m_coast('patch',[.8 .8 .8]);
colormap(ha6,sunshine_9lev_2/255)
caxis([0 5]);
hc=colorbar('horizontal');
set(hc,'position',[0.045,.11,0.442,0.015],'Ticks',[0 1 2 3 4 5],'fontname','Times New Roman','fontsize',fs)
cbarrow('right')
title('(f) THE [2071-2100]','fontsize',fs,'fontname','Times New Roman')
text(-1.8,-0.76,'Mean intensity under SSP585 (\circC)','fontsize',fs,'fontname','Times New Roman')


% (c) Global MHW change
ha3=axes('position',[0.545,0.64,0.29,0.325],'fontname','Times New Roman');
set(gcf,'currentaxes',ha3);
m_proj('Equidistant Cylindrical','lon',[0 360],'lat',[-80 90]);
m_contourf(Xa,Ya,MMMc,[-4:0.1:4],'linestyle','none')
m_grid('linest','none','xticklabels',[],'yticklabels',[-60 -30 0 30 60 90],'fontsize',fs,'fontname','Times New Roman');
m_coast('patch',[.8 .8 .8]);
% colormap(ha3,cmp1/255)
colormap(cmp1/255)
caxis([-4 4]);
hc=colorbar('horizontal');
set(hc,'position',[0.545,.61,0.442,0.015],'Ticks',[-4 -3 -2 -1 0 1 2 3 4],'fontname','Times New Roman','fontsize',fs)
cbarrow
title('(c) MHW change','fontsize',fs,'fontname','Times New Roman')

% (d) Arctic MHW change
ha4=axes('position',[0.83,0.64,0.17,0.334],'fontname','Times New Roman');
set(gcf,'currentaxes',ha4);
m_proj('stereographic','lat',90,'long',0,'radius',35,'rectbox','on');       
m_contourf(lon,lat,MMMc1,[-4:0.1:4],'linestyle','none')
m_grid('linest',':','xticklabels',[],'ytick',[70 80],'yticklabels',[]);
m_coast('patch',[.8 .8 .8]);
colormap(ha4,cmp1/255)
caxis([-4 4]);
hc=colorbar('horizontal');
set(hc,'position',[0.545,.61,0.442,0.015],'Ticks',[-4 -3 -2 -1 0 1 2 3 4],'fontname','Times New Roman','fontsize',fs)
cbarrow
title('(d) MHW change','fontsize',fs,'fontname','Times New Roman')
text(-1.95,-0.76,'Mean intensity change under SSP585 (\circC)','fontsize',fs,'fontname','Times New Roman')

% (g) Global THE change
ha7=axes('position',[0.545,0.14,0.29,0.325],'fontname','Times New Roman');
set(gcf,'currentaxes',ha7);
m_proj('Equidistant Cylindrical','lon',[0 360],'lat',[-80 90]);
m_contourf(Xe,Ye,MMMg,[-4:0.1:4],'linestyle','none')
m_grid('linest','none','xticklabels',[],'yticklabels',[-60 -30 0 30 60 90],'fontsize',fs,'fontname','Times New Roman');
m_coast('patch',[.8 .8 .8]);
colormap(ha7,cmp1/255)
caxis([-4 4]);
hc=colorbar('horizontal');
set(hc,'position',[0.545,.11,0.442,0.015],'Ticks',[-4 -3 -2 -1 0 1 2 3 4],'fontname','Times New Roman','fontsize',fs)
cbarrow  
title('(g) THE change','fontsize',fs,'fontname','Times New Roman')

% (h) Arctic THE change
ha8=axes('position',[0.83,0.14,0.17,0.334],'fontname','Times New Roman');
set(gcf,'currentaxes',ha8);
m_proj('stereographic','lat',90,'long',0,'radius',35,'rectbox','on');       
m_contourf(lon,lat,MMMg1,[-4:0.1:4],'linestyle','none')
m_grid('linest',':','xticklabels',[],'ytick',[70 80],'yticklabels',[]);
m_coast('patch',[.8 .8 .8]);
colormap(ha8,cmp1/255)
caxis([-4 4]);
hc=colorbar('horizontal');
set(hc,'position',[0.545,.11,0.442,0.015],'Ticks',[-4 -3 -2 -1 0 1 2 3 4],'fontname','Times New Roman','fontsize',fs)
cbarrow  
title('(h) THE change','fontsize',fs,'fontname','Times New Roman')
text(-1.95,-0.76,'Mean intensity change under SSP585 (\circC)','fontsize',fs,'fontname','Times New Roman')

colormap(ha1,sunshine_9lev_2/255)
colormap(ha2,sunshine_9lev_2/255)
colormap(ha5,sunshine_9lev_2/255)
colormap(ha6,sunshine_9lev_2/255)

 print(gcf,'-dpdf','-r600','D:\data_code_figures\figures\Figure2.pdf')