function square_ij_fill ( m, i, j, r, color )

%*****************************************************************************80
%
%% square_ij_fill() plots a filled square centered at Cell(I,J)
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    07 November 2017
%
%  Author:
%
%    John Burkardt
%
%  Input:
%
%    integer M, the number of rows in the matrix.
%
%    integer I, J, the indices of the cell.
%
%    real R, the radius of the square.
%
%    MATLAB color COLOR, can be any of the 8 abbreviated color terms
%    'r', 'g', 'b', 'c', 'm', 'y', 'w', 'k', or an RGB triple such as 
%    [1.0,0.4,0.0].  The circle is filled with this color.
%
  xc = j - 0.5;
  yc = m - i + 0.5;

  a = xc - r;
  b = xc + r;
  c = yc - r;
  d = yc + r;

  fill ( [ a, b, b, a ], [ c, c, d, d ], color );

  return
end
