function president_heights_histogram ( )

%*****************************************************************************80
%
%% PRESIDENT_HEIGHTS_HISTOGRAM makes a histogram of Presidential heights.
%
%  Licensing:
%
%    This code is distributed under the GNU LGPL license.
%
%  Modified:
%
%    19 July 2018
%
%  Author:
%
%    John Burkardt
%
  fprintf ( 1, '\n' );
  fprintf ( 1, 'PRESIDENT_HEIGHTS_HISTOGRAM\n' );
  fprintf ( 1, '  Octave version\n' );
  fprintf ( 1, '  Create a histogram of the height in inches of US presidents.\n' );
%
%  Load the data.
%  The data is in a "comma separated value" file.
%  We need to skip the first line, because it contains non-numeric data (labels).
%  We need to skip the first column, because it contains non-numeric data (names).
%
  height = csvread ( 'president_heights_data.csv', 1, 1 );

  [ m, n ] = size ( height );
  fprintf ( 1, '\n' );
  fprintf ( 1, '  %d x %d data records read from file.\n', m, n );
%
%  Create a histogram.
%
  bin_min = min ( height );
  bin_max = max ( height );
  bin_num = 20;
 
  [ bin_ave, bin_count ] = histogramize ( m, height, bin_min, bin_max, bin_num );

  bar ( bin_ave, bin_count );

  grid ( 'on' )
  title ( 'US President Heights' )
  xlabel ( '<-- Height in Inches -->' )
  ylabel ( 'Frequency' )

  pause ( 5 )
%
%  Save a copy of the plot as a PNG file.
%
  filename = 'president_heights_histogram.png';
  print ( '-dpng', filename );
  fprintf ( 1, '\n' );
  fprintf ( 1, '  Graphics saved as "%s"\n', filename );
%
%  Terminate.
%
  fprintf ( 1, '\n' );
  fprintf ( 1, 'PRESIDENT_HEIGHTS_HISTOGRAM:\n' );
  fprintf ( 1, '  Normal end of execution.\n' );

  return
end
