% Generates a plot of the WGOM fits under dark conditions

clf
clear all
ms = 6
%2 deg. 
load ../data/amy2d;

subplot(2,2,1)
set(gca,'fontsize',9)
aa = find((drk2(:,1) <= 75) & (drk2(:,2) <= 90));
bb = find((drk2(:,1) > 75) | (drk2(:,2) > 90));  
plot(drk2(aa,1),drk2(aa,2),'o','MarkerFaceColor',[0 0 0],'MarkerEdgeColor',[0 0 0],'MarkerSize',ms);
hold on
plot(drk2(bb,1),drk2(bb,2),'o','MarkerFaceColor',[1 1 1],'MarkerEdgeColor',[0 0 0],'MarkerSize',ms);
tt = title('WGOM dark, 2C, m = 0.91');
set(tt,'fontsize',9)
xlabel('days')
ylabel('% germinated');
a = [0.91 4.80];
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/amy4d;

subplot(2,2,2)
set(gca,'fontsize',9)
aa = find((drk4(:,1) <= 75) & (drk4(:,2) <= 90));
bb = find((drk4(:,1) > 75) | (drk4(:,2) > 90));
plot(drk4(aa,1),drk4(aa,2),'o','MarkerFaceColor',[0 0 0],'MarkerEdgeColor',[0 0 0],'MarkerSize',ms);
hold on
plot(drk4(bb,1),drk4(bb,2),'o','MarkerFaceColor',[1 1 1],'MarkerEdgeColor',[0 0 0],'MarkerSize',ms);
tt = title('WGOM dark, 4C, m = 0.82');
set(tt,'fontsize',9)
xlabel('days')
ylabel('% germinated');
a = [0.82 0.67];
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/amy6d;

subplot(2,2,3)
set(gca,'fontsize',9)
aa = find((drk6(:,1) <= 75) & (drk6(:,2) <= 90));
bb = find((drk6(:,1) > 75) | (drk6(:,2) > 90));
plot(drk6(aa,1),drk6(aa,2),'o','MarkerFaceColor',[0 0 0],'MarkerEdgeColor',[0 0 0],'MarkerSize',ms);
hold on
plot(drk6(bb,1),drk6(bb,2),'o','MarkerFaceColor',[1 1 1],'MarkerEdgeColor',[0 0 0],'MarkerSize',ms);
tt = title('WGOM dark 6C m = 1.19');
set(tt,'fontsize',9)
xlabel('days')
ylabel('% germinated')
a = [1.19 2.31];
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/amy8d 

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