%% Open data file
dataf1 = importdata('FigB1.csv');
dndlogdp1 = dataf1.data(2:289,:);
dndlogdp2 = dataf1.data(290:end,:);
timef1 = datetime(dataf1.textdata(2:end));
timef1sub1 = timef1(1:288);
timef1sub2 = timef1(289:end);
diam_smps = dataf1.data(1,:);
%% Call new figure
figure("Position",[747,365,897,346])
tile_fig1 = tiledlayout(1,2,"TileSpacing","compact","Padding","compact");
%% Plot the first subplot
nexttile(1)
imagesc(datenum(timef1sub1),diam_smps,dndlogdp1');
ax1=gca;
set(ax1,'YDir','normal','XTick',0:3:24,'YScale','log','box','off','YTick',[10 20 50 100 200 400]),ylim([10 414.2])
ylabel('Diameter (nm)')
datetick(ax1)
colormap(viridis);
text(-0.23,0.97,'(a)','Units','normalized','FontSize',16,'FontWeight','bold');

%% Plot the second subplot
nexttile(2)
imagesc(datenum(timef1sub2),diam_smps,dndlogdp2');
ax2=gca;
set(ax2,'YDir','normal','XTick',0:3:24,'YScale','log','box','off','YTick',[10 20 50 100 200 400]),ylim([10 414.2])
h=colorbar;
ylabel(h,'dN/dlogDp (cm^-^3)')
ylabel('Diameter (nm)')
datetick(ax2)
colormap(viridis);
text(-0.23,0.97,'(b)','Units','normalized','FontSize',16,'FontWeight','bold');
xlabel(tile_fig1,'Local Time','FontSize',14)