function mad_solution_plot ( m, t, y, label )

%*****************************************************************************80
%
%% mad_solution_plot() makes a solution 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(n+1): the sequence of time values.
%
%    real y(n+1,m): the sequence of solutions.
%
%    string label: a label to prefix the plotfile name.
%    The file will be 'label_solution.png'.
%
  clf ( );
  plot ( t, y, 'linewidth', 2 );
  grid ( 'on' );
  xlabel ( '<-- T -->' );
  ylabel ( '<-- Y(T) -->' );
  s = sprintf ( 'mad(): %s solution', label );
  title ( s )
  filename = sprintf ( '%s_solution.png', label );
  print ( '-dpng', filename );
  fprintf ( 1, '  Graphics saved as "%s"\n', filename );

  return
end

