% Plots the germination fits for the EGOM germination data in dark conditions 

clf
clear all
% marker size
ms = 6;

%2 deg. 
load ../data/egom2d;

subplot(2,3,1)
set(gca,'fontsize',7)
aa = find((egom2d(:,1) <= 75) & (egom2d(:,2) <= 90));
bb = find((egom2d(:,1) > 75) | (egom2d(:,2) > 90));
plot(egom2d(aa,1),egom2d(aa,2),'o','MarkerFaceColor',[0 0 0],'MarkerEdgeColor',[0 0 0],'MarkerSize',ms);
hold on
plot(egom2d(bb,1),egom2d(bb,2),'o','MarkerFaceColor',[1 1 1],'MarkerEdgeColor',[0 0 0],'MarkerSize',ms);
tt = title('EGOM dark, 2C, slope = 1.21');
set(tt,'fontsize',9)
xlabel('days')
ylabel('% germinated');
a = [1.21 -10.51];
x = [0:80];
y = polyval(a,x);
d = plot(x,y,'k-');
set(d,'LineWidth',2);
axis([0 100 0 110]);
set(gca,'XTick',[0 25 50 75 100]);
grid on

%4 deg.
load ../data/egom4d;

subplot(2,3,2)
set(gca,'fontsize',7)
aa = find((egom4d(:,1) <= 75) & (egom4d(:,2) <= 90));
bb = find((egom4d(:,1) > 75) | (egom4d(:,2) > 90));
plot(egom4d(aa,1),egom4d(aa,2),'o','MarkerFaceColor',[0 0 0],'MarkerEdgeColor',[0 0 0],'MarkerSize',ms);
hold on
plot(egom4d(bb,1),egom4d(bb,2),'o','MarkerFaceColor',[1 1 1],'MarkerEdgeColor',[0 0 0],'MarkerSize',ms);
tt = title('EGOM dark, 4C, slope = 1.43');
set(tt,'fontsize',9)
xlabel('days')
ylabel('% germinated');
a = [1.43 -4.98];
x = [0:80];
y = polyval(a,x);
d = plot(x,y,'k-');
set(d,'LineWidth',2);
axis([0 100 0 110]);
set(gca,'XTick',[0 25 50 75 100]);
grid on

%6 deg.
load ../data/egom6d;

subplot(2,3,3)
set(gca,'fontsize',7)
aa = find((egom6d(:,1) <= 75) & (egom6d(:,2) <= 90));
bb = find((egom6d(:,1) > 75) | (egom6d(:,2) > 90));
plot(egom6d(aa,1),egom6d(aa,2),'o','MarkerFaceColor',[0 0 0],'MarkerEdgeColor',[0 0 0],'MarkerSize',ms);
hold on
plot(egom6d(bb,1),egom6d(bb,2),'o','MarkerFaceColor',[1 1 1],'MarkerEdgeColor',[0 0 0],'MarkerSize',ms);
tt = title('EGOM dark, 6C, slope = 1.70');
set(tt,'fontsize',9)
xlabel('days')
ylabel('% germinated');
a = [1.70 -9.82];
x = [0:80];
y = polyval(a,x);
d = plot(x,y,'k-');
set(d,'LineWidth',2);
axis([0 100 0 110]);
set(gca,'XTick',[0 25 50 75 100]);
grid on

%8 deg.
load ../data/egom8d;

subplot(2,3,4)
set(gca,'fontsize',7)
aa = find((egom8d(:,1) <= 75) & (egom8d(:,2) <= 90));
bb = find((egom8d(:,1) > 75) | (egom8d(:,2) > 90));
plot(egom8d(aa,1),egom8d(aa,2),'o','MarkerFaceColor',[0 0 0],'MarkerEdgeColor',[0 0 0],'MarkerSize',ms);
hold on
plot(egom8d(bb,1),egom8d(bb,2),'o','MarkerFaceColor',[1 1 1],'MarkerEdgeColor',[0 0 0],'MarkerSize',ms);
tt = title('EGOM dark, 8C, slope = 3.32');
set(tt,'fontsize',9)
xlabel('days')
ylabel('% germinated');
a = [3.32 -11.87];
x = [0:80];
y = polyval(a,x);
d = plot(x,y,'k-');
set(d,'LineWidth',2);
axis([0 100 0 110]);
set(gca,'XTick',[0 25 50 75 100]);
grid on


%15 deg.
load ../data/egom15d

subplot(2,3,5)
set(gca,'fontsize',7)
aa = find((egom15d(:,1) <= 75) & (egom15d(:,2) <= 90));
bb = find((egom15d(:,1) > 75) | (egom15d(:,2) > 90));
plot(egom15d(aa,1),egom15d(aa,2),'o','MarkerFaceColor',[0 0 0],'MarkerEdgeColor',[0 0 0],'MarkerSize',ms);
hold on
plot(egom15d(bb,1),egom15d(bb,2),'o','MarkerFaceColor',[1 1 1],'MarkerEdgeColor',[0 0 0],'MarkerSize',ms);
tt = title('EGOM dark, 15C, slope = 4.24');
set(tt,'fontsize',9)
xlabel('days')
ylabel('% germinated');
b = [4.24 1.57];
x = [0:80];
y = polyval(b,x);
d = plot(x,y,'k-');
set(d,'LineWidth',2);
axis([0 100 0 110]);
set(gca,'XTick',[0 25 50 75 100]);
grid on
