function pariomino_print ( p, label )

%*****************************************************************************80
%
%% pariomino_print() prints a pariomino.
%
%  Discussion:
%
%    A polyomino is a shape formed by connecting unit squares edgewise
%
%    A variomino is a polyomino in which each square has been assigned
%    a value between 1 and v.
%
%    A variomino can be represented by an MxN matrix, whose entries are
%    between 1 and v for squares that are part of the variomino, 
%    and 0 otherwise.
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    19 April 2023
%
%  Author:
%
%    John Burkardt
%
%  Input:
%
%    integer p(m,n): a matrix representing the variomino.  
%
%    string label: a label to be printed.  
%
  fprintf ( 1, '\n' );
  fprintf ( 1, '%s\n', label );
  fprintf ( 1, '\n' );

  [ m, n ] = size ( p );

  if ( m <= 0 | n <= 0 )
    fprintf ( 1, '  [ Null matrix ]\n' );
  else
    for i = 1 : m
      fprintf ( 1, '  ' );
      for j = 1 : n
        if ( p(i,j) == 0 )
          fprintf ( 1, '.', p(i,j) );
        else
          fprintf ( 1, '%d', p(i,j) );
        end
      end
      fprintf ( 1, '\n' );
    end
  end

  return
end
