function snowfall_smoothed_plot ( )

%*****************************************************************************80
%
%% SNOWFALL_SMOOTHED_PLOT smoothes and then plots snowfall data.
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    19 July 2018
%
%  Author:
%
%    John Burkardt
%
  timestamp ( );
  fprintf ( 1, '\n' );
  fprintf ( 1, 'SNOWFALL_SMOOTHED_PLOT:\n' );
  fprintf ( 1, '  MATLAB/Octave version %s:\n', version ( ) );
  fprintf ( 1, '  Read snowfall data\n' );
  fprintf ( 1, '  Use Octave''s conv() function to make a 10 year\n' );
  fprintf ( 1, '  moving average.\n' );
  fprintf ( 1, '  Plot the smoothed data.\n' );

  y = load ( 'snowfall_data.txt' );
  year = y(:,1);
  inches = y(:,10);

  z = conv ( inches, ones ( 10, 1 ) / 10, 'same' );

  plot ( year, z, 'Linewidth', 2 );
  grid on
  xlabel ( '<-- Year -->' )
  ylabel ( '<-- Total Snow in Inches -->' )
  title ( 'Yearly Snowfall in Michigan, 10-Year Moving Average' )

  pause ( 5 )
%
%  Save graphics to a file.
%
  filename = 'snowfall_smoothed_plot.png';
  print ( '-dpng', filename );
  fprintf ( 1, '\n' );
  fprintf ( 1, '  Graphics saved in "%s"\n', filename );
%
%  Terminate.
%
  fprintf ( 1, '\n' );
  fprintf ( 1, 'SNOWFALL_SMOOTHED_PLOT:\n' );
  fprintf ( 1, '  Normal end of execution.\n' );
  timestamp ( );

  return
end

