function nile_histogram ( )

%*****************************************************************************80
%
%% nile_histogram plots a histogram of yearly flood levels for the Nile.
%
%  Licensing:
%
%    This code is distributed under the GNU LGPL license.
%
%  Modified:
%
%    30 April 2018
%
%  Author:
%
%    John Burkardt
%
  fprintf ( 1, '\n' );
  fprintf ( 1, 'nile_histogram:\n' );
  fprintf ( 1, '  MATLAB version\n' );
  fprintf ( 1, '  Make a histogram of yearly Nile flood levels.\n' );

  data = load ( 'nile_data.txt' );

  [ m, n ] = size ( data );
  fprintf ( 1, '\n' );
  fprintf ( 1, '  %d x %d data records read from file.\n', m, n );
%
%  For simplicity, copy column 2 and call it "height".
%
  height = data(:,2);

  histogram ( height );
  grid on
  xlabel ( '<-- Height of Nile at Maximum Flood -->', 'Fontsize', 16 )
  ylabel ( '<-- Frequency -->', 'Fontsize', 16 )
  title ( 'Yearly Nile Flood Height', 'Fontsize', 16 )
%
%  Save the graphics in a file.
%
  filename = 'nile_histogram.png';
  print ( '-dpng', filename )
  fprintf ( 1, '\n' );
  fprintf ( 1, '  Graphics saved as "%s"\n', filename );
%
%  Terminate.
%
  fprintf ( 1, '\n' );
  fprintf ( 1, 'nile_histogram:\n' );
  fprintf ( 1, '  Normal end of execution.\n' );

  return
end

