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 data records read from file.\n' );
%
%  For simplicity, copy column 2 and call it "height".
%
  height = data(:,2);

  histogram ( height );
  grid on
  xlabel ( '<-- Height of Nile at Maximum Flood -->' )
  ylabel ( '<-- Frequency -->' )
  title ( 'Yearly Nile Flood Height' )

  filename = 'nile_histogram.png';
  print ( '-dpng', filename )
%
%  Terminate.
%
  fprintf ( 1, '\n' );
  fprintf ( 1, 'NILE_HISTOGRAM:\n' );
  fprintf ( 1, '  Normal end of execution.\n' );

  return
end

