function mortality_pdf_plot ()

%*****************************************************************************80
%
%% mortality_pdf_plot() plots mortality probability density function.
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    28 November 2020
%
%  Author:
%
%    John Burkardt
%
  [ age, total_pdf, male_pdf, female_pdf ] = mortality_pdf ();
%
%  Plot the data.
%
  figure ( );
  clf ( );
  hold ( 'on' );
    plot ( age, total_pdf, 'k-', 'linewidth', 3 );
    plot ( age, male_pdf, 'b-', 'linewidth', 3 );
    plot ( age, female_pdf, 'r-', 'linewidth', 3 );
  hold ( 'off' );
  xlabel ( '<-- Age at death -->' );
  ylabel ( '<-- Probability of death -->' );
  title ( 'Probability of deaths for each age, in 2007' );
  legend ( 'Total', 'Male', 'Female' );
  grid ( 'on' );

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

  close ( );

  return
end
