function dist_plot_test ( )

%*****************************************************************************80
%
%% DIST_PLOT_TEST tests DIST_PLOT.
%
%  Licensing:
%
%    This code is distributed under the GNU LGPL license.
%
%  Modified:
%
%    08 January 2019
%
%  Author:
%
%    John Burkardt
%
%  Reference:
%
%    Per-Olof Persson and Gilbert Strang,
%    A Simple Mesh Generator in MATLAB,
%    SIAM Review,
%    Volume 46, Number 2, June 2004, pages 329-345.
%
%  Local parameters:
%
  addpath ( '../dist_plot' );

  timestamp ( );
  fprintf ( 1, '\n' );
  fprintf ( 1, 'DIST_PLOT_DEMO\n' );
  fprintf ( 1, '  Test DIST_PLOT.\n' );
%
%  Problem 1.
%
  [ d, n ] = r8mat_header_read ( 'p01_nodes.txt' );
  p = r8mat_data_read ( 'p01_nodes.txt', d, n );
  t = i4mat_read ( 'p01_elements.txt' );
  dist_plot ( p', t', @p01_fd );
  filename = 'p01_dist.png';
  print ( '-dpng', filename );
  fprintf ( 1, '  Graphics saved as "%s"\n', filename );
%
%  Problem 2.
%
  [ d, n ] = r8mat_header_read ( 'p02_nodes.txt' );
  p = r8mat_data_read ( 'p02_nodes.txt', d, n );
  t = i4mat_read ( 'p02_elements.txt' );
  dist_plot ( p', t', @p02_fd );
  filename = 'p02_dist.png';
  print ( '-dpng', filename );
  fprintf ( 1, '  Graphics saved as "%s"\n', filename );
%
%  Problem 3.
%
  [ d, n ] = r8mat_header_read ( 'p03_nodes.txt' );
  p = r8mat_data_read ( 'p03_nodes.txt', d, n );
  t = i4mat_read ( 'p03_elements.txt' );
  dist_plot ( p', t', @p03_fd );
  filename = 'p03_dist.png';
  print ( '-dpng', filename );
  fprintf ( 1, '  Graphics saved as "%s"\n', filename );
%
%  Problem 4.
%
  [ d, n ] = r8mat_header_read ( 'p04_nodes.txt' );
  p = r8mat_data_read ( 'p04_nodes.txt', d, n );
  t = i4mat_read ( 'p04_elements.txt' );
  dist_plot ( p', t', @p04_fd );
  filename = 'p04_dist.png';
  print ( '-dpng', filename );
  fprintf ( 1, '  Graphics saved as "%s"\n', filename );
%
%  Problem 5.
%
  [ d, n ] = r8mat_header_read ( 'p05_nodes.txt' );
  p = r8mat_data_read ( 'p05_nodes.txt', d, n );
  t = i4mat_read ( 'p05_elements.txt' );
  dist_plot ( p', t', @p05_fd );
  filename = 'p05_dist.png';
  print ( '-dpng', filename );
  fprintf ( 1, '  Graphics saved as "%s"\n', filename );
%
%  Problem 6.
%
  fprintf ( 1, '  Skipping test #6, "maple" command not available.\n' );
  if ( false )
    [ d, n ] = r8mat_header_read ( 'p06_nodes.txt' );
    p = r8mat_data_read ( 'p06_nodes.txt', d, n );
    t = i4mat_read ( 'p06_elements.txt' );
    dist_plot ( p', t', @p06_fd );
    filename = 'p06_dist.png';
    print ( '-dpng', filename );
    fprintf ( 1, '  Graphics saved as "%s"\n', filename );
  end
%
%  Problem 7.
%
  fprintf ( 1, '  Skipping test #7, "maple" command not available.\n' );
  if ( false )
    [ d, n ] = r8mat_header_read ( 'p07_nodes.txt' );
    p = r8mat_data_read ( 'p07_nodes.txt', d, n );
    t = i4mat_read ( 'p07_elements.txt' );
    dist_plot ( p', t', @p07_fd );
    filename = 'p07_dist.png';
    print ( '-dpng', filename );
    fprintf ( 1, '  Graphics saved as "%s"\n', filename );
  end
%
%  Problem 8.
%
  [ d, n ] = r8mat_header_read ( 'p08_nodes.txt' );
  p = r8mat_data_read ( 'p08_nodes.txt', d, n );
  t = i4mat_read ( 'p08_elements.txt' );
  dist_plot ( p', t', @p08_fd );
  filename = 'p08_dist.png';
  print ( '-dpng', filename );
  fprintf ( 1, '  Graphics saved as "%s"\n', filename );
%
%  Problem 9.
%
  [ d, n ] = r8mat_header_read ( 'p09_nodes.txt' );
  p = r8mat_data_read ( 'p09_nodes.txt', d, n );
  t = i4mat_read ( 'p09_elements.txt' );
  dist_plot ( p', t', @p09_fd );
  filename = 'p09_dist.png';
  print ( '-dpng', filename );
  fprintf ( 1, '  Graphics saved as "%s"\n', filename );
%
%  Problem 10.
%
  [ d, n ] = r8mat_header_read ( 'p10_nodes.txt' );
  p = r8mat_data_read ( 'p10_nodes.txt', d, n );
  t = i4mat_read ( 'p10_elements.txt' );
  dist_plot ( p', t', @p10_fd );
  filename = 'p10_dist.png';
  print ( '-dpng', filename );
  fprintf ( 1, '  Graphics saved as "%s"\n', filename );
%
%  Problem 11.
%
  [ d, n ] = r8mat_header_read ( 'p11_nodes.txt' );
  p = r8mat_data_read ( 'p11_nodes.txt', d, n );
  t = i4mat_read ( 'p11_elements.txt' );
  dist_plot ( p', t', @p11_fd );
  filename = 'p11_dist.png';
  print ( '-dpng', filename );
  fprintf ( 1, '  Graphics saved as "%s"\n', filename );
%
%  Problem 12.
%
  [ d, n ] = r8mat_header_read ( 'p12_nodes.txt' );
  p = r8mat_data_read ( 'p12_nodes.txt', d, n );
  t = i4mat_read ( 'p12_elements.txt' );
  dist_plot ( p', t', @p12_fd );
  filename = 'p12_dist.png';
  print ( '-dpng', filename );
  fprintf ( 1, '  Graphics saved as "%s"\n', filename );
%
%  Problem 13.
%
  [ d, n ] = r8mat_header_read ( 'p13_nodes.txt' );
  p = r8mat_data_read ( 'p13_nodes.txt', d, n );
  t = i4mat_read ( 'p13_elements.txt' );
  dist_plot ( p', t', @p13_fd );
  filename = 'p13_dist.png';
  print ( '-dpng', filename );
  fprintf ( 1, '  Graphics saved as "%s"\n', filename );
%
%  Problem 14.
%
  [ d, n ] = r8mat_header_read ( 'p14_nodes.txt' );
  p = r8mat_data_read ( 'p14_nodes.txt', d, n );
  t = i4mat_read ( 'p14_elements.txt' );
  dist_plot ( p', t', @p14_fd );
  filename = 'p14_dist.png';
  print ( '-dpng', filename );
  fprintf ( 1, '  Graphics saved as "%s"\n', filename );
%
%  Problem 15.
%
  [ d, n ] = r8mat_header_read ( 'p15_nodes.txt' );
  p = r8mat_data_read ( 'p15_nodes.txt', d, n );
  t = i4mat_read ( 'p15_elements.txt' );
  dist_plot ( p', t', @p15_fd );
  filename = 'p15_dist.png';
  print ( '-dpng', filename );
  fprintf ( 1, '  Graphics saved as "%s"\n', filename );
%
%  Problem 16.
%
  global R1 R2

  R1 = 0.4;
  R2 = 1.0;

  [ d, n ] = r8mat_header_read ( 'p16_nodes.txt' );
  p = r8mat_data_read ( 'p16_nodes.txt', d, n );
  t = i4mat_read ( 'p16_elements.txt' );
  dist_plot ( p', t', @p16_fd );
  filename = 'p16_dist.png';
  print ( '-dpng', filename );
  fprintf ( 1, '  Graphics saved as "%s"\n', filename );
%
%  Problem 17.
%
  [ d, n ] = r8mat_header_read ( 'p17_nodes.txt' );
  p = r8mat_data_read ( 'p17_nodes.txt', d, n );
  t = i4mat_read ( 'p17_elements.txt' );
  dist_plot ( p', t', @p17_fd );
  filename = 'p17_dist.png';
  print ( '-dpng', filename );
  fprintf ( 1, '  Graphics saved as "%s"\n', filename );
%
%  Problem 18.
%
  [ d, n ] = r8mat_header_read ( 'p18_nodes.txt' );
  p = r8mat_data_read ( 'p18_nodes.txt', d, n );
  t = i4mat_read ( 'p18_elements.txt' );
  dist_plot ( p', t', @p18_fd );
  filename = 'p18_dist.png';
  print ( '-dpng', filename );
  fprintf ( 1, '  Graphics saved as "%s"\n', filename );
%
%  Terminate.
%
  fprintf ( 1, '\n' );
  fprintf ( 1, 'DIST_PLOT_TEST\n' );
  fprintf ( 1, '  Normal end of execution.\n' );
  fprintf ( 1, '\n' );
  timestamp ( );

  rmpath ( '../dist_plot' );

  return
end
