
load("data_Fig2.mat")

figure('Color', 'w', 'Units','normalized', 'Position', [0.3 0.05 0.3 0.8])
subplot(4,1,1)
plot(time, E_las_phi0, 'LineWidth', 1.5, 'Color', my_Lila)
hold on
plot(time, E_las_phipi, 'LineWidth', 1.5, 'Color', my_Green)
xlim([-4 4])
ylim([-0.3 0.3])
xlabel 'Time'
ylabel 'Field strength'
set(gca, 'FontSize', 14)

subplot(4,1,2)
plot(E_tdse, log10(spec_tdse_cep_scan(ind_c_tdse(1),:)), 'Color', my_Lila, 'LineWidth', 1.5)
hold on
plot(E_tdse, log10(spec_tdse_cep_scan(ind_c_tdse(2),:)), 'Color', my_Green, 'LineWidth', 1.5)
plot(Espec/Up, log10(abs(spec_full(:, ind_c(1))).^2)-2, '--', 'Color', my_Lila, 'LineWidth', 1.5)
plot(Espec/Up, log10(abs(spec_full(:, ind_c(2))).^2)-2, '--', 'Color', my_Green, 'LineWidth', 1.5)
xlim([0 15])
ylim([-11 -1])
ylabel 'log(Yield) (arb.u.)'
set(gca, 'FontSize', 14)

subplot(4,1,3)
imagesc(E_tdse, cep_tdse, log10(spec_tdse_cep_scan))
colormap(cm_cpi)
clim([-11 -1])
xlim([0 15])
ylabel('CEP [\pi]')
set(gca, 'FontSize', 14)

subplot(4,1,4)
imagesc(Espec/Up, cep_full, log10(abs(spec_full.').^2))
xlim([0 15])
clim([-9 1])
colormap(cm_cpi)
xlabel 'Energy (U_p)'
ylabel 'CEP (\pi)'
set(gca, 'FontSize', 14)

hold on
plot(E_co_dir_full/Up, cep_full, 'Color', my_B, 'LineWidth', 1)
plot(E_co_rec_full/Up, cep_full, 'Color', my_R, 'LineWidth', 1)