function lv2_env_plot(r1,k1,n01,r2,k2,n02,alfa12,alfa21,frequ,k1new,k2new,nostep,animation)
%This function plots dynamics and lines together, LV dynamics with environmental change

%r1, r2 - intrinsic growth rates for species 1 and 2
%k1, k2 - carrying capacities
%n01, n02 - initial population sizes
%alfa12, alfa21 - competition coefficients
%frequ - how often to disturb (no of time steps between disturbance events)
%int1, int2 - proportion of population of species 1 and 2 left after disturbance  
%nostep - number of steps for simulation
%animation - whether to animate


x=lv2_env(r1,k1,n01,r2,k2,n02,alfa12,alfa21,frequ,k1new,k2new,nostep);
y=lv2_lines(k1,k2,alfa12,alfa21);
y1=lv2_lines(k1new,k2new,alfa12,alfa21);

plot(y(1,:),y(2:3,:));
axis([0, max(y(1,:)), 0, max(max(y(2:3,:)))])
hold on;
plot(y1(1,:),y1(2:3,:),':');
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

