function polyiamond_region_plot_test ( )

%*****************************************************************************80
%
%% polyiamond_region_plot_test tests polyiamond_region_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:
%
%    06 September 2020
%
%  Author:
%
%    John Burkardt
%
  timestamp ( );
  fprintf ( 1, '\n' );
  fprintf ( 1, 'polyiamond_region_plot_test\n' );
  fprintf ( 1, '  MATLAB/Octave version %s\n', version ( ) );
  fprintf ( 1, '  polyiamond_region_plot plots a region.\n' );

  iv = [ 0,5,5,4,4,3,3,1,1,0,0,1,2,2,0 ];
  jv = [ 0,0,1,2,5,5,3,5,4,4,3,3,2,1,1 ];

  clf ( );
  hold ( 'on' );
%
%  Draw the parallelogram grid.
%
  imin = min ( iv );
  imax = max ( iv ) + 1;
  jmin = min ( jv );
  jmax = max ( jv + 1 );
  r = 0.85;
  color_back = 'cyan';
  color_tri =  'yellow';
  number = false;
  polyiamond_grid_plot ( imin, jmin, imax, jmax, r, ...
    color_back, color_tri, number )
%
%  Draw the region.
%
  color = 'blue';
  polyiamond_region_plot ( iv, jv, color );

  axis ( 'equal' );
  axis ( 'off' );
  title ( 'Plotting a region on a grid.' )
  hold ( 'off' );

  filename = 'polyiamond_region_plot_test.png';
  print ( '-dpng', filename );
  fprintf ( 1, '  Graphics saved as "%s"\n', filename );
%
%  Terminate.
%
  fprintf ( 1, '\n' );
  fprintf ( 1, 'polyiamond_region_plot_test\n' );
  fprintf ( 1, '  Normal end of execution.\n' );
  timestamp ( );

  return
end
