
clear				% Clear previous definitions
figure(1)           % Assign figure number
clf                 % Clear previous figures
hold off            % Start with fresh graph

mytitle = 'Lake Pollution'; 	% Title
xlab = '$t$ days'; 		% X-label
ylab = '$c(t)$ ppm'; 		% Y-label

lake_level              % Find time pollution exceeds 2 ppm (subroutine)

plot(t1,y1,'b-','LineWidth',1.5);  % Plot concentration of pollution
hold on                            % Plots Multiple graphs
plot([tc,tc],[0,3],'r:','LineWidth',1.5);  % Plot when reaches critical level
grid                                % Adds Gridlines
text(500,0.6,'Critical time','rotation',90,'color','red','FontSize',14,...
    'FontName','Times New Roman');

xlim([0 2000]);  % Defines limits of graph
ylim([0 3]);

fontlabs = 'Times New Roman';   % Font type used in labels
xlabel(xlab,'FontSize',14,'FontName',fontlabs,'interpreter','latex');  
        % x-Label size and font
ylabel(ylab,'FontSize',14,'FontName',fontlabs,'interpreter','latex');  
        % y-Label size and font
title(mytitle,'FontSize',16,'FontName','Times New Roman','interpreter','latex'); 
        % Title size/font
set(gca,'FontSize',12);         % Axis tick font size

print -depsc lake2.eps		% Create figure as EPS file
%print -djpeg lake2.jpg		% Create figure as JPEG file

