function geyser_bar ( )

%*****************************************************************************80
%
%% GEYSER_BAR uses MATLAB to make a bar plot.
%
%  Licensing:
%
%    This code is distributed under the GNU LGPL license.
%
%  Modified:
%
%    19 July 2018
%
%  Author:
%
%    John Burkardt
%
  fprintf ( 1, '\n' );
  fprintf ( 1, 'GEYSER_BAR\n' );
  fprintf ( 1, '  Octave version\n' );
  fprintf ( 1, '  Read binned data of waiting times between eruptions\n' );
  fprintf ( 1, '  of the Old Faithful geyser.\n' );
  fprintf ( 1, '  Create a corresponding bar plot.\n' );

  filename = 'geyser_bar_data.txt';
  xy = load ( filename );
%
%  Set the relative width of the bar.
%
  bar_width = 0.80;
%
%  Draw a bar graph.
%
  bar ( xy(:,1), xy(:,2), bar_width, 'r' );

  grid on
  title ( 'Time between eruptions of Old Faithful' )
  xlabel ( 'Minutes' )
  ylabel ( 'Frequency' )

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

  return
end
