function mortality_count_plot ()

%*****************************************************************************80
%
%% mortality_count_plot() plots mortality counts.
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    04 February 2024
%
%  Author:
%
%    John Burkardt
%
  fprintf ( 1, '\n' );
  fprintf ( 1, 'mortality_count_plot():\n' );
  fprintf ( 1, '  mortality_count_plot() plots mortality counts.\n' );
%
%  Get the data.
%
  [ age, total, male, female ] = mortality_count ( );
%
%  Create the plot.
%
  figure ( );
  clf ( );
  hold ( 'on' );
    plot ( age, total, 'k-', 'linewidth', 3 );
    plot ( age, male, 'b-', 'linewidth', 3 );
    plot ( age, female, 'r-', 'linewidth', 3 );
  hold ( 'off' );
  xlabel ( '<-- Age at death -->' );
  ylabel ( '<-- Number of deaths -->' );
  title ( 'mortality counts: 2007' );
  legend ( 'total', 'male', 'female' );
  grid ( 'on' );

  filename = 'mortality_count.png';
  print ( '-dpng', filename );
  fprintf ( 1, '  Graphics saved as "%s"\n', filename );
  close ( );

  return
end
 
