function boundary_word_boundary_plot ( s )

%*****************************************************************************80
%
%% boundary_word_boundary_plot() plots the perimeter of a polyomino defined by a boundary word.
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    05 May 2020
%
%  Author:
%
%    John Burkardt
%
%  Input:
%
%    char s(n): a string of the characters 'u', 'd', 'l' and 'r' that should
%    represent a path around the boundary of a polyomino.
%
  check = boundary_word_check ( s );
  if ( ~ check )
    fprintf ( 1, '\n' );
    fprintf ( 1, 'boundary_word_boundary_plot - Fatal error!\n' );
    fprintf ( 1, '  Input boundary word "%s" is illegal.\n', s );
    return
  end

  [ x, y ] = boundary_word_boundary ( s );

  plot ( x, y, '-x', 'LineWidth', 5 );
  if ( ~ is_octave ( ) )
    v = min ( x ) : 1 : max ( x );
    xticks ( v );
    v = min ( y ) : 1 : max ( y );
    yticks ( v );
  end
  grid ( 'on' );
  title ( s );
  axis ( 'equal' );

  return
end

