function predator_euler_phase ( n )

%*****************************************************************************80
%
%% predator_euler_phase shows a phase plane for the predator problem.
%
%  Licensing:
%
%    This code is distributed under the GNU LGPL license.
%
%  Modified:
%
%    08 September 2020
%
%  Author:
%
%    John Burkardt
%
%  Input:
%
%    integer N: the number of steps to take.
%
  fprintf ( 1, '\n' );
  fprintf ( 1, 'predator_euler_phase' );
  fprintf ( 1, '  Solve predator-prey equation with Euler method\n' );
  fprintf ( 1, '  Plot the phase plane.\n' );

  if ( nargin < 1 )
    n = 100000;
    fprintf ( 1, '\n' );
    fprintf ( 1, '  Input value N not supplied.  Using N = %d\n', n );
  end

  dydt = @predator_deriv;
  tspan = [ 0.0, 50.0 ];
  y0 = [ 4.0, 2.0 ];
  [ t, y ] = euler ( dydt, tspan, y0, n );

  plot ( y(:,1), y(:,2), 'linewidth', 3 );
  grid ( 'on' );
  xlabel ( '<-- R(T)-->' );
  ylabel ( '<-- F(T)-->' );
  s = sprintf ( 'Predator ODE Euler, n = %d.', n );
  title ( s );
  filename = sprintf ( 'predator_euler_phase_%d.png', n );
  print ( '-dpng', filename );
  fprintf ( 1, '  Graphics saved as "%s"\n', filename );

  return
end

