function brownian_2d_plot ( )

%*****************************************************************************80
%
%% brownian_2d_plot() plots Brownian motion in 2D.
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    06 April 2018
%
%  Author:
%
%    John Burkardt
%
  fprintf ( 1, '\n' );
  fprintf ( 1, 'brownian_2d_plot():\n' );
  fprintf ( 1, '  MATLAB/Octave version %s:\n', version ( ) );
  fprintf ( 1, '  Plot Brownian motion in two dimensions.\n' );
%
%  Read data from file.
%
  filename = 'brownian_2d_data.txt';
  x = load ( filename );
  n = size ( x, 1 );
%
%  Display.
%
  clf ( );
  hold ( 'on' );
  plot ( x(:,1), x(:,2), 'Color', 'b', 'LineWidth', 2 );
  plot ( x(1,1), x(1,2), 'g.', 'MarkerSize', 35 );
  plot ( x(n,1), x(n,2), 'r.', 'MarkerSize', 35 );
  grid ( 'on' );
  xlabel ( '<--X-->', 'Fontsize', 16 );
  ylabel ( '<--Y-->', 'Fontsize', 16 );
  title ( 'Brownian motion in two dimensions', 'Fontsize', 16 );
  axis ( 'equal' );
  hold ( 'off' );
%
%  Save graphic data in a file.
%
  filename = sprintf ( 'brownian_2d_plot.png' );
  print ( '-dpng', filename );
  fprintf ( 1, '\n' );
  fprintf ( 1, '  Graphics saved as "%s".\n', filename );
%
%  Terminate.
%
  fprintf ( 1, '\n' );
  fprintf ( 1, 'brownian_2d_plot():\n' );
  fprintf ( 1, '  Normal end of execution.\n' );

  return
end


