clear

% Load control IP3 from ../figS2A/
% Assume that you had run 'genesis figS2A.g'
IP3_control = load('../figS2A/paramsIP3ratio1_IP3.plot');

param_num1 = 6;
param_num2 = 7;
param_num3 = 8;
param_num4 = 9;

titel_num1 = strcat('#', int2str(param_num1), ' Title for UpLeft');
titel_num2 = strcat('#', int2str(param_num2), ' Title for UpRight');
titel_num3 = strcat('#', int2str(param_num3), ' Title for DownLeft');
titel_num4 = strcat('#', int2str(param_num4), ' Titel for DownRight');


IP3_1(:, 1:2)  = load(strcat('paramsIP3_param', int2str(param_num1), '_ratio2_IP3.plot'));
IP3_1(:, 3:4)  = load(strcat('paramsIP3_param', int2str(param_num1), '_ratio5_IP3.plot'));
IP3_1(:, 5:6)  = load(strcat('paramsIP3_param', int2str(param_num1), '_ratio5_IP3.plot'));
IP3_1(:, 7:8)  = load(strcat('paramsIP3_param', int2str(param_num1), '_ratio0.2_IP3.plot'));
IP3_1(:, 9:10) = load(strcat('paramsIP3_param', int2str(param_num1), '_ratio10_IP3.plot'));
IP3_1(:,11:12) = load(strcat('paramsIP3_param', int2str(param_num1), '_ratio0.1_IP3.plot'));
IP3_1(:,13:14) = load(strcat('paramsIP3_param', int2str(param_num1), '_ratio20_IP3.plot'));
IP3_1(:,15:16) = load(strcat('paramsIP3_param', int2str(param_num1), '_ratio0.05_IP3.plot'));
IP3_1(:,17:18) = load(strcat('paramsIP3_param', int2str(param_num1), '_ratio50_IP3.plot'));
IP3_1(:,19:20) = load(strcat('paramsIP3_param', int2str(param_num1), '_ratio0.02_IP3.plot'));
IP3_1(:,21:22) = load(strcat('paramsIP3_param', int2str(param_num1), '_ratio100_IP3.plot'));
IP3_1(:,23:24) = load(strcat('paramsIP3_param', int2str(param_num1), '_ratio0.01_IP3.plot'));

IP3_2(:, 1:2)  = load(strcat('paramsIP3_param', int2str(param_num2), '_ratio2_IP3.plot'));
IP3_2(:, 3:4)  = load(strcat('paramsIP3_param', int2str(param_num2), '_ratio5_IP3.plot'));
IP3_2(:, 5:6)  = load(strcat('paramsIP3_param', int2str(param_num2), '_ratio5_IP3.plot'));
IP3_2(:, 7:8)  = load(strcat('paramsIP3_param', int2str(param_num2), '_ratio0.2_IP3.plot'));
IP3_2(:, 9:10) = load(strcat('paramsIP3_param', int2str(param_num2), '_ratio10_IP3.plot'));
IP3_2(:,11:12) = load(strcat('paramsIP3_param', int2str(param_num2), '_ratio0.1_IP3.plot'));
IP3_2(:,13:14) = load(strcat('paramsIP3_param', int2str(param_num2), '_ratio20_IP3.plot'));
IP3_2(:,15:16) = load(strcat('paramsIP3_param', int2str(param_num2), '_ratio0.05_IP3.plot'));
IP3_2(:,17:18) = load(strcat('paramsIP3_param', int2str(param_num2), '_ratio50_IP3.plot'));
IP3_2(:,19:20) = load(strcat('paramsIP3_param', int2str(param_num2), '_ratio0.02_IP3.plot'));
IP3_2(:,21:22) = load(strcat('paramsIP3_param', int2str(param_num2), '_ratio100_IP3.plot'));
IP3_2(:,23:24) = load(strcat('paramsIP3_param', int2str(param_num2), '_ratio0.01_IP3.plot'));

IP3_3(:, 1:2)  = load(strcat('paramsIP3_param', int2str(param_num3), '_ratio2_IP3.plot'));
IP3_3(:, 3:4)  = load(strcat('paramsIP3_param', int2str(param_num3), '_ratio5_IP3.plot'));
IP3_3(:, 5:6)  = load(strcat('paramsIP3_param', int2str(param_num3), '_ratio5_IP3.plot'));
IP3_3(:, 7:8)  = load(strcat('paramsIP3_param', int2str(param_num3), '_ratio0.2_IP3.plot'));
IP3_3(:, 9:10) = load(strcat('paramsIP3_param', int2str(param_num3), '_ratio10_IP3.plot'));
IP3_3(:,11:12) = load(strcat('paramsIP3_param', int2str(param_num3), '_ratio0.1_IP3.plot'));
IP3_3(:,13:14) = load(strcat('paramsIP3_param', int2str(param_num3), '_ratio20_IP3.plot'));
IP3_3(:,15:16) = load(strcat('paramsIP3_param', int2str(param_num3), '_ratio0.05_IP3.plot'));
IP3_3(:,17:18) = load(strcat('paramsIP3_param', int2str(param_num3), '_ratio50_IP3.plot'));
IP3_3(:,19:20) = load(strcat('paramsIP3_param', int2str(param_num3), '_ratio0.02_IP3.plot'));
IP3_3(:,21:22) = load(strcat('paramsIP3_param', int2str(param_num3), '_ratio100_IP3.plot'));
IP3_3(:,23:24) = load(strcat('paramsIP3_param', int2str(param_num3), '_ratio0.01_IP3.plot'));

IP3_4(:, 1:2)  = load(strcat('paramsIP3_param', int2str(param_num4), '_ratio2_IP3.plot'));
IP3_4(:, 3:4)  = load(strcat('paramsIP3_param', int2str(param_num4), '_ratio5_IP3.plot'));
IP3_4(:, 5:6)  = load(strcat('paramsIP3_param', int2str(param_num4), '_ratio5_IP3.plot'));
IP3_4(:, 7:8)  = load(strcat('paramsIP3_param', int2str(param_num4), '_ratio0.2_IP3.plot'));
IP3_4(:, 9:10) = load(strcat('paramsIP3_param', int2str(param_num4), '_ratio10_IP3.plot'));
IP3_4(:,11:12) = load(strcat('paramsIP3_param', int2str(param_num4), '_ratio0.1_IP3.plot'));
IP3_4(:,13:14) = load(strcat('paramsIP3_param', int2str(param_num4), '_ratio20_IP3.plot'));
IP3_4(:,15:16) = load(strcat('paramsIP3_param', int2str(param_num4), '_ratio0.05_IP3.plot'));
IP3_4(:,17:18) = load(strcat('paramsIP3_param', int2str(param_num4), '_ratio50_IP3.plot'));
IP3_4(:,19:20) = load(strcat('paramsIP3_param', int2str(param_num4), '_ratio0.02_IP3.plot'));
IP3_4(:,21:22) = load(strcat('paramsIP3_param', int2str(param_num4), '_ratio100_IP3.plot'));
IP3_4(:,23:24) = load(strcat('paramsIP3_param', int2str(param_num4), '_ratio0.01_IP3.plot'));


time = -500:1:1000;

subplot(4,1,1)
plot(time,IP3_control(1:1501,2), 'LineWidth', 2, 'Color','k')
hold on
plot(time, IP3_1(1:1501,  2), 'b-', time, IP3_1(1:1501,  4), 'b:', ... 
     time, IP3_1(1:1501,  6), 'c-', time, IP3_1(1:1501,  8), 'c:', ...
     time, IP3_1(1:1501, 10), 'g-', time, IP3_1(1:1501, 12), 'g:', ...
     time, IP3_1(1:1501, 14), 'y-', time, IP3_1(1:1501, 16), 'y:', ...
     time, IP3_1(1:1501, 18), 'r-', time, IP3_1(1:1501, 20), 'r:', ...
     time, IP3_1(1:1501, 22), 'm-', time, IP3_1(1:1501, 24), 'm:' )
axis([-100 1000 0 10])
set(gca,'xtick',[0 200 400 600 800])
set(gca,'ytick',[0 2 4 6 8 10])
title(titel_num1)
xlabel('Time (ms)')
ylabel('[IP3] (\muM)')

subplot(4,1,2)
plot(time,IP3_control(1:1501,2), 'LineWidth', 2, 'Color','k')
hold on
plot(time, IP3_2(1:1501,  2), 'b-', time, IP3_2(1:1501,  4), 'b:', ... 
     time, IP3_2(1:1501,  6), 'c-', time, IP3_2(1:1501,  8), 'c:', ...
     time, IP3_2(1:1501, 10), 'g-', time, IP3_2(1:1501, 12), 'g:', ...
     time, IP3_2(1:1501, 14), 'y-', time, IP3_2(1:1501, 16), 'y:', ...
     time, IP3_2(1:1501, 18), 'r-', time, IP3_2(1:1501, 20), 'r:', ...
     time, IP3_2(1:1501, 22), 'm-', time, IP3_2(1:1501, 24), 'm:' )
axis([-100 1000 0 10])
set(gca,'xtick',[0 200 400 600 800])
set(gca,'ytick',[0 2 4 6 8 10])
title(titel_num2)
xlabel('Time (ms)')
ylabel('[IP3] (\muM)')

subplot(4,1,3)
plot(time,IP3_control(1:1501,2), 'LineWidth', 2, 'Color','k')
hold on
plot(time, IP3_3(1:1501,  2), 'b-', time, IP3_3(1:1501,  4), 'b:', ... 
     time, IP3_3(1:1501,  6), 'c-', time, IP3_3(1:1501,  8), 'c:', ...
     time, IP3_3(1:1501, 10), 'g-', time, IP3_3(1:1501, 12), 'g:', ...
     time, IP3_3(1:1501, 14), 'y-', time, IP3_3(1:1501, 16), 'y:', ...
     time, IP3_3(1:1501, 18), 'r-', time, IP3_3(1:1501, 20), 'r:', ...
     time, IP3_3(1:1501, 22), 'm-', time, IP3_3(1:1501, 24), 'm:' )
axis([-100 1000 0 10])
set(gca,'xtick',[0 200 400 600 800])
set(gca,'ytick',[0 2 4 6 8 10])
title(titel_num3)
xlabel('Time (ms)')
ylabel('[IP3] (\muM)')

subplot(4,1,4)
plot(time,IP3_control(1:1501,2), 'LineWidth', 2, 'Color','k')
hold on
plot(time, IP3_4(1:1501,  2), 'b-', time, IP3_4(1:1501,  4), 'b:', ... 
     time, IP3_4(1:1501,  6), 'c-', time, IP3_4(1:1501,  8), 'c:', ...
     time, IP3_4(1:1501, 10), 'g-', time, IP3_4(1:1501, 12), 'g:', ...
     time, IP3_4(1:1501, 14), 'y-', time, IP3_4(1:1501, 16), 'y:', ...
     time, IP3_4(1:1501, 18), 'r-', time, IP3_4(1:1501, 20), 'r:', ...
     time, IP3_4(1:1501, 22), 'm-', time, IP3_4(1:1501, 24), 'm:' )
axis([-100 1000 0 10])
set(gca,'xtick',[0 200 400 600 800])
set(gca,'ytick',[0 2 4 6 8 10])
title(titel_num4)
xlabel('Time (ms)')
ylabel('[IP3] (\muM)')

