%This script will plot two populations growing at different rates and then format those plots.

clf %clear figure
clc %clear text from command window
clear %clear variables

h = figure; %Make new Figure
[t,y] = expgrowth(1000000,240,10000,20); % Call our function expgrowth to get data for 20 min doubling time
[t2,y2] = expgrowth(1000000,240,10000,60);

p = semilogy(t,y); %make a semilog plot
hold on % this to be here because otherwise the scale won't change

p2 = semilogy(t2,y2);
mylegend = legend('20 min', '60 min'); 

hTitle = title('My Test');
hxlabel = xlabel('Time (seconds)');
hylabel = ylabel('Number of Bacteria');

set(hTitle, 'FontSize', 18,'FontWeight','Bold') %change format of title

set(p,'LineStyle', '--','Marker', 'o', 'Color', [.05 0 0]) %change format of line
saveas(h,'test','jpg')
hold off