

clear; clc;

load('fig5.mat');

figure;
set(gca,'color',[1 1 1]);
set(gca,'defaultAxesFontSize',18);
subplot(411);
plot(fig5a.x,fig5a.y,'-r','linewidth',1.0); hold on;
datetick('x','HH:MM'); 
xlabel('Time (UT)'); ylabel('Flux (W/m^2)')
ylim([1e-7,1e-3]);
set(gca,'XLim',[fig5a.xind fig5a.xind+1]);
set(gca,'XTick',[fig5a.xind:1/6:fig5a.xind+1]);
set(gca,'XTickLabel',{'00:00' '04:00' '08:00' '12:00' '16:00' '20:00' '24:00'});
set(gca,'ytick',[1e-7 1e-6 1e-5 1e-4 1e-3])
set(gca,'yscale','log');
set(gca,'xminortick','on');
box on; grid on;
set(gcf,'Position',[300 250 750 300],'Unit','pixels');

subplot(412);
imagesc(fig5b.t,fig5b.wl,log10(fig5b.spectra)); axis xy;
set(gca,'XTick',[0:4:24]);
set(gca,'XTickLabel',{'00:00' '04:00' '08:00' '12:00' '16:00' '20:00' '24:00'});
xlabel('Time (UT)'); ylabel('Wavelength (nm)');
colormap('jet'); caxis([-8 -2]); 

subplot(413);
imagesc(fig5c.t,fig5c.alt,log10(fig5c.ion)); axis xy;
set(gca,'XTick',[1:600:length(fig5c.t)]); set(gca,'XTickLabel',{'13:40' '13:50' '14:00' '14:10'})
set(gca,'YLim',[30 100]); set(gca,'YTick',30:20:90); colormap('jet'); caxis([-2 4])
xlabel('Time (UT)'); ylabel('Altitude (km)')
yyaxis right;
semilogy(fig5c.x,fig5c.xflux,'-b','lineWidth',1);
ax=gca; ax.YAxis(2).Color='b';
ylabel('Fux (W/m^2)')

subplot(414)
imagesc(fig5d.t,fig5d.alt(1:151),log10(fig5d.ne)); axis xy;
set(gca,'XTick',[1:600:length(fig5c.t)]); set(gca,'XTickLabel',{'13:40' '13:50' '14:00' '14:10'})
set(gca,'YLim',[30 100]); set(gca,'YTick',30:20:90); colormap('jet'); caxis([-2 5])
xlabel('Time (UT)'); ylabel('Altitude (km)')
yyaxis right;
semilogy(fig5d.x,fig5d.xflux,'-b','lineWidth',1);
ax=gca; ax.YAxis(2).Color='b';
ylabel('Flux (W/m^2)')