function lissajous_plot ( )

%*****************************************************************************80
%
%% lissajous_plot() draws a closed planar curve.
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    16 May 2011
%
%  Author:
%
%    John Burkardt
%
  fprintf ( 1, '\n' );
  fprintf ( 1, 'lissajous_plot():\n' );
  fprintf ( 1, '  MATLAB/Octave version %s:\n', version ( ) );
  fprintf ( 1, '  Make a plane curve by connecting a series of points.\n' );
  fprintf ( 1, '  Also mark every 10th point.\n' );

  xy = load ( 'lissajous_data.txt' );

  hold ( 'on' );
    plot ( xy(:,1), xy(:,2), 'LineWidth', 2, 'Color', 'm' );
    plot ( xy(1:10:end,1), xy(1:10:end,2), 'k.', 'Markersize', 20 );
  hold ( 'off' )

  grid ( 'on' );
  axis ( [ -1.2, +1.2, -1.2, +1.2 ] )
  axis ( 'equal' );
  xlabel ( '<--- X --->', 'Fontsize', 16 );
  ylabel ( '<--- Y --->', 'Fontsize', 16 );
  title ( 'Lissajous, x=sin(3t+pi/2), y=sin(4t)', 'Fontsize', 16 );
%
%  Save the plot as a PNG file.
%
  filename = 'lissajous_plot.png';
  print ( '-dpng', filename );
  fprintf ( 1, '\n' );
  fprintf ( 1, '  Graphics saved as "%s"\n', filename );
%
%  Terminate.
%
  fprintf ( 1, '\n' );
  fprintf ( 1, 'lissajous_plot():\n' );
  fprintf ( 1, '  Normal end of execution.\n' );

  return
end
