% Logistic Example - Updating Functions
xlab = '$p_n$'; 		
ylab = '$p_{n+1}$'; 		
mytitle = 'Updating Function for Logistic Model'; 

pp = linspace(0,1300,100);
pnr1 = 1.5*pp - (0.5/1000)*pp.^2;
pnr2 = 2.85*pp - (1.85/1000)*pp.^2;
pnr3 = 3.3*pp - (2.3/1000)*pp.^2;
pnr4 = 3.65*pp - (2.65/1000)*pp.^2;

plot(pp,pnr1,'b-','LineWidth',1.5);
hold on
plot(pp,pnr2,'r-','LineWidth',1.5);
plot(pp,pnr3,'-','color',[0,0.5,0],'LineWidth',1.5);
plot(pp,pnr4,'m-','LineWidth',1.5);
plot(pp,pp,'k:','LineWidth',1.5);

grid
text(250,220,'$p_{n+1} = p_{n} + rp_n\left(1 - \frac{p_n}{1000}\right)$',...
    'FontSize',14,'interpreter','latex');
l= legend('$r = 0.5$','$r = 1.85$','$r = 2.3$','$r = 2.65$','Identity',...
    'Location','Southeast');
set(l,'Interpreter','Latex');

axis equal
xlim([0 1300]);
ylim([0 1300]);
fontlabs = 'Times New Roman';   % Font type used in labels
xlabel(xlab,'FontSize',14,'FontName',fontlabs,'interpreter','latex');  
ylabel(ylab,'FontSize',14,'FontName',fontlabs,'interpreter','latex'); 
%title(mytitle,'FontSize',16,'FontName',fontlabs,'interpreter','latex'); 
set(gca,'FontSize',12);

print -depsc logup_eg.eps