function mad_phase_plot ( m, t, y, label )

%*****************************************************************************80
%
%% mad_phase_plot() makes a phase plot for mad_compute().
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    11 July 2024
%
%  Author:
%
%    John Burkardt, Catalin Trenchea
%
%  Input:
%
%    integer m: the number of solution components.
%
%    real t(nstep+1): the sequence of time values.
%
%    real y(nstep+1,m): the sequence of solutions.
%
%    string label: a label to prefix the plotfile name.
%    The file will be 'label_phase.png'.
%
  clf ( );
  plot ( y(:,1), y(:,2), 'linewidth', 2 );
  grid ( 'on' );
  xlabel ( 'y1(t)' );
  ylabel ( 'y2(t)' );
  s = sprintf ( 'mad(): %s phase', label );
  title ( s );
  filename = sprintf ( '%s_phase.png', label );
  print ( '-dpng', filename );
  fprintf ( 1, '  Graphics saved as "%s"\n', filename );

  return
end

