function coin_streak_plot ( n, v, label, filename )

%*****************************************************************************80
%
%% COIN_STREAK_PLOT plots streaks of H's and T's in N coin tosses.
%
%  Licensing:
%
%    This code is distributed under the GNU LGPL license.
%
%  Modified:
%
%    22 February 2016
%
%  Author:
%
%    John Burkardt
%
%  Parameters:
%
%    Input, integer N, the number of tosses.
%
%    Input, real V(N), the toss results, -1 or +1.
%
%    Input, string LABEL, a label for the plot.
%
%    Input, string FILENAME, a name for the plot file.
%
  s = coin_streak ( n, v );

  clf;
  np1 = 0:n;
  bar ( np1, s );

  grid on
  title ( label );
  xlabel ( '<-- Tosses -->', 'FontSize', 16 )
  ylabel ( '<-- Streaks -->', 'FontSize', 16 )

  print ( '-dpng', filename );
  fprintf ( 1, '\n' );
  fprintf ( 1, '  Saving a copy of this plot in "%s"\n', filename );

  return
end
