% SMPSread
clear

M=importdata('c:/MyPortable/DATA/MMSF_NUC/Datafiles_NEW_SMPS/08MAY_SMPStop.dat',' ');

day=M(:,1);
size1=M(:,2);
size2=M(:,3);
size3=M(:,4);
size4=M(:,5);
size5=M(:,6);
size6=M(:,7);
size7=M(:,8);
size8=M(:,9);
size9=M(:,10);
size10=M(:,11);
size11=M(:,12);
size12=M(:,13);
size13=M(:,14);
size14=M(:,15);
size15=M(:,16);
size16=M(:,17);
size17=M(:,18);
size18=M(:,19);
size19=M(:,20);
size20=M(:,21);
size21=M(:,22);
size22=M(:,23);
size23=M(:,24);
size24=M(:,25);
size25=M(:,26);
size26=M(:,27);
size27=M(:,28);
size28=M(:,29);
size29=M(:,30);
size30=M(:,31);
size31=M(:,32);
size32=M(:,33);
size33=M(:,34);
size34=M(:,35);
size35=M(:,36);
size36=M(:,37);
size37=M(:,38);
size38=M(:,39);
size39=M(:,40);
size40=M(:,41);
size41=M(:,42);
size42=M(:,43);
size43=M(:,44);
size44=M(:,45);
size45=M(:,46);
size46=M(:,47);
size47=M(:,48);
size48=M(:,49);
size49=M(:,50);
size50=M(:,51);
size51=M(:,52);
size52=M(:,53);
size53=M(:,54);
size54=M(:,55);
size55=M(:,56);
size56=M(:,57);
size57=M(:,58);
size58=M(:,59);
size59=M(:,60);
size60=M(:,61);
size61=M(:,62);
size62=M(:,63);
size63=M(:,64);
size64=M(:,65);
size65=M(:,66);
size66=M(:,67);
size67=M(:,68);
size68=M(:,69);
size69=M(:,70);
size70=M(:,71);
size71=M(:,72);
size72=M(:,73);
size73=M(:,74);
size74=M(:,75);
size75=M(:,76);
size76=M(:,77);
size77=M(:,78);
size78=M(:,79);
size79=M(:,80);
size80=M(:,81);

binsize=[6.15,6.38,6.61,6.85,7.1,7.37,7.64,7.91,8.2,8.51,8.82,9.14,9.47,9.82,10.2,10.6,10.9,11.3,11.8,12.2,12.6,13.1,13.6,14.1,14.6,15.1,15.7,16.3,16.8,17.5,18.1,18.8,19.5,20.2,20.9,21.7,22.5,23.3,24.1,25,25.9,26.9,27.9,28.9,30,31.1,32.2,33.4,34.6,35.9,37.2,38.5,40,41.4,42.9,44.5,46.1,47.8,49.6,51.4,53.3,55.2,57.3,59.4,61.5,63.8,66.1,68.5,71,73.7,76.4,79.1,82,85.1,88.2,91.4,94.7,98.2,101.8,105.5];
particle=log10(binsize);
con=[size1,size2,size3,size4,size5,size6,size7,size8,size9,size10,size11,size12,size13,size14,size15,size16,size17,size18,size19,size20,size21,size22,size23,size24,size25,size26,size27,size28,size29,size30,size31,size32,size33,size34,size35,size36,size37,size38,size39,size40,size41,size42,size43,size44,size45,size46,size47,size48,size49,size50,size51,size52,size53,size54,size55,size56,size57,size58,size59,size60,size61,size62,size63,size64,size65,size66,size67,size68,size69,size70,size71,size72,size73,size74,size75,size76,size77,size78,size79,size80];
con=con';

figure(1)
set(gcf, 'PaperPositionMode', 'manual');
set(gcf, 'PaperUnits', 'points');
set(gcf, 'PaperPosition', [50 222 500 390]);
axes('position',[.1 .2 .8 .7])
surf(day,binsize,real(log10(con)),'line','none')
caxis('auto');
caxis([1 6]);

%view(0,90);
title('(a)                                                                   dN/dlog_1_0Dp (cm^-^3)','FontSize',14,'Fontname','Arial','horizontalalignment','center');

xlabel('SMPS. MMSF. 2008 MAY','FontSize',14,'Fontname','Arial');
ylabel('Dp (nm)','FontSize',14,'Fontname','Arial');
set(gca,'YScale','log','Ylim',[6,100]);
set(gca,'ytick',[6,10,20,30,40,50,100])
set(gca,'YTicklabel',{'6','10','20','30','40','50','100'},'FontSize',14,'Fontname','Arial');
set(gca,'Xlim',[5,31]);
set(gca,'XTick',[5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31])
set(gca,'XTickLabel',{'5','6','7','8','9','10','11','12','13','14','15','16','17','18','19','20','21','22','23','24','25','26','27','28','29','30','31'},'FontSize',10,'Fontname','Arial');
set(gca,'TickDir','out');
set(gca,'ZScale','log','Zlim',[0 100000]);
colorbar('ZDir','reverse','YTickLabel',{'10^1','10^2','10^3','10^4','10^5','10^6'},'FontSize',14,'Fontname','Arial');

%shading interp;
az = 0;
el = 90;
view(az, el);

set(gca,'LineWidth', 1.5);
box on;
set(gca,'XGrid','on','LineWidth', 1.5)
set(gca,'YGrid','on','LineWidth', 1.5)

print -f1 -r600 -dtiff 'MMSF_SMPS_2008MAY.tif'
print -f1 -djpeg 'MMSF_SMPS_2008MAY.jpg'
print -f1 -depsc -tiff 'MMSF_SMPS_2008MAY.eps'

clear