function triangle_plot_test ( )

%*****************************************************************************80
%
%% triangle_plot_test tests triangle_plot().
%
%  Discussion:
%
%    5           x x x x-x x
%                 /|  / /
%    4         x-x x x x x
%             /    |/ /
%    3       x-x x x x x
%              |    /
%    2     x x x x x x
%             /    |
%    1   x-x-x x x x
%       /         /
%    0 x-x-x-x-x-x
%
%      0 1 2 3 4 5
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    16 November 2020
%
%  Author:
%
%    John Burkardt
%
  fprintf ( 1, '\n' );
  fprintf ( 1, 'triangle_plot_test\n' );
  fprintf ( 1, '  MATLAB/Octave version %s\n', version ( ) );
  fprintf ( 1, '  triangle_plot() plots a polyiamond from its triangle list.\n' );

  t = triangle_gort ( );

  [ imin, imax, jmin, jmax ] = triangle_range ( t );
  imax = imax + 1;
  jmax = jmax + 1;

  clf ( );
  hold ( 'on' );
%
%  Draw the parallelogram grid.
%
  r = 0.85;
  color_back = 'cyan';
  color_tri =  'yellow';
  number = false;
  grid_plot ( imin, imax, jmin, jmax, r, color_back, color_tri, number );
%
%  Draw the polyiamond from its triangle list.
%
  color = 'blue';
  number = true;
  triangle_plot ( t, color, number );

  axis ( 'equal' );
  axis ( 'off' );
  title ( 'Triangle plot test: gort.' );
  hold ( 'off' );

  filename = 'triangle_plot_test_gort.png';
  print ( '-dpng', filename );
  fprintf ( 1, '  Graphics saved as "%s"\n', filename );
%
%  Now do the 12 hexiamonds.
%
  for k = 1 : 12
    name = name_hexiamond ( k );
    t = triangle_hexiamond ( k );
    [ imin, imax, jmin, jmax ] = triangle_range ( t );
    imax = imax + 1;
    jmax = jmax + 1;
    clf ( );
    hold ( 'on' );
    r = 0.85;
    color_back = 'cyan';
    color_tri =  'yellow';
    number = false;
    grid_plot ( imin, imax, jmin, jmax, r, color_back, color_tri, number );
    color = 'blue';
    number = true;
    triangle_plot ( t, color, number );
    axis ( 'equal' );
    axis ( 'off' );
    label = [ 'triangle plot test: ', name ];
    title ( label );
    hold ( 'off' );
    filename = [ 'triangle_plot_test_', name, '.png' ];
    print ( '-dpng', filename );
    fprintf ( 1, '  Graphics saved as "%s"\n', filename );
  end
%
%  Terminate.
%
  fprintf ( 1, '\n' );
  fprintf ( 1, 'triangle_plot_test\n' );
  fprintf ( 1, '  Normal end of execution.\n' );

  return
end
