function cell_fill ( i, j, color )

%*****************************************************************************80
%
%% CELL_FILL plots a filled (I,J) cell.
%
%  Discussion:
%
%    We assume the data is represented in a matrix.
%
%    In order to convert between the matrix coordinates and picture
%    coordinates, the (I,J) cell will be drawn with the following corners:
%
%    (j-1,-i+1), (j,-i+1), (j,-i), (j-1,-1).
%
%    As odd as this looks, it does present the data in the aspect
%    expected by the user.
%
%  Licensing:
%
%    This code is distributed under the GNU LGPL license.
%
%  Modified:
%
%    26 October 2017
%
%  Author:
%
%    John Burkardt
%
%  Parameters:
%
%    Input, integer I, J, the index of the cell.
%
%    Input, 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 square is filled with this color.
%
  a = j - 1;
  b = j;
  c = - ( i - 1 );
  d = - i;

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

  return
end