function pp_plot(r1,K,n01,c,a,Th,d,n02,nostep,animation)
%This function plots simulated dynamics and isolines together (predator-prey)

%Prey:
%r1 - intrinsic growth rate 
%K - prey carrying capacity
%n01 - initial population sizes 

%Predator:
%c - prey conversion rate
%a - encounter rate
%Th - handling time
%d - predator mortality
%n02 - initial population size

%nostep - number of steps for simulation
%animation - whether to animate

x=pp_time(r1,K,n01,c,a,Th,d,n02,nostep);
[y,R0]=pp_lines(r1,K,c,a,Th,d);

if (R0 == 0)
   return;
end
   
plot(y(1,:),y(2,:));
axis([0, max(max(y(1,:)),max(x(1,:))), 0, max(max(x(2,:)),max(y(2,:)))])
hold on;
R0
line([R0 R0 ],[0 max(max(x(2,:)),max(y(2,:)))],'color','g');
if (animation > 0)
   for i=1:nostep-1
      plot([x(1,i),x(1,i+1)],[x(2,i),x(2,i+1)],'r.-');
      pause(0.1);
   end
   
else
   plot(x(1,:),x(2,:),'r');
end

