% show some raw data
clear

linecolor = [0.5, 0,   1;  %violet
             0,   0,   1;    %blue
             0,   1,   1;    %cyan
             0,   1,   0;    %dark green
             0.5, 1,   0;    %light green
             1,   1,   0;    %yellow
             1,   0.5, 0;    %orange
             1,   0,   0;    %red
             1,   0,   1;    %magenta
             1,   0.5, 1];   %pink

CFkf = [1749,  4775,  7674,  9870, 11503, 12762, 13780, 14643, 15404, 16100];
CaInput = CFkf / 4166.7 * 2500;        

time = [-2, 0, 0, 2, 2, 20];
IP3timecourse = zeros(6,3) + 0.1;
Catimecourse = zeros(6,10);

IP3timecourse(3:6,2) = 2.5;
IP3timecourse(3:6,3) = 10;
Catimecourse(3,:) = CFkf;
Catimecourse(4,:) = CFkf;

subplot(2,1,1)
plot(time, IP3timecourse(:,1),'k', time, IP3timecourse(:,2),'k', time, IP3timecourse(:,3),'k')
axis([-2 20 0 12])
set(gca,'xtick',[-5 0 2 20])
set(gca,'XTickLabel','|||')
set(gca,'ytick',[0.1 2.5 10])
set(gca,'YTickLabel','0.1|2.5|10|')
set(gca,'Tickdir','out')
box off
xlabel('Time')
ylabel('[IP3] (\muM)')

subplot(2,1,2)
for i = 10:-1:1
plot(time, Catimecourse(:,i), 'Color',linecolor(i,:))
hold on
end
axis([-2 20 0 20000])
set(gca,'xtick',[-5 0 2 20])
set(gca,'XTickLabel','|||')
set(gca,'ytick',[0 5000 10000 15000 20000])
set(gca,'YTickLabel','0|5|10|15|20')
set(gca,'Tickdir','out')
box off
xlabel('Time')
ylabel('Ca2+ input (1000 #/ms)')