function schoolyear_bar_plot ( )

%*****************************************************************************80
%
%% schoolyear_bar_plot creates a (horizontal) bar plot of schoolyear lengths.
%
%  Discussion:
%
%    For a horizontal bar plot, it's easier to label each bar in a readable way.
%
%    Ordinarily, I would prefer to read the data from a file.  However,
%    MATLAB has some difficulty dealing with data files that include text 
%    fields.  Rather than try to use "readtable", I supply the data with
%    a function.
%
%  Licensing:
%
%    This code is distributed under the GNU LGPL license.
%
%  Modified:
%
%    08 October 2019
%
%  Author:
%
%    John Burkardt
%
  fprintf ( 1, '\n' );
  fprintf ( 1, 'schoolyear_bar_plot:\n' );
  fprintf ( 1, '  MATLAB version\n' );
  fprintf ( 1, '  Get data of country names and school year lengths.\n' );
  fprintf ( 1, '  Make a horizontal bar plot, with labeled bars.\n' );
%
%  Get the data.
%
  [ country, days ] = schoolyear_data ( );
%
%  Make a horizontal bar plot.
%
  barh ( days );
  set ( gca, 'yticklabel', country );
  grid ( 'on' );
  xlabel ( '<-- School Year in Days -->', 'FontSize', 16 );
  title ( 'International Variation in School Year', 'FontSize', 24 );
%
%  Save a snapshot of the plot.
%
  filename = 'schoolyear_bar_plot.png';
  print ( '-dpng', filename );
  fprintf ( 1, '  Graphics saved as "%s"\n', filename );
%
%  Terminate.
%
  fprintf ( 1, '\n' );
  fprintf ( 1, 'schoolyear_bar_plot:\n' );
  fprintf ( 1, '  Normal end of execution.\n' );

  return
end

