When using ArrayPlot with both PixelConstrained->True
and Mesh->True
, the lower and right walls of the mesh both drop out:
ArrayPlot[Table[Mod[Ceiling[i/2] + Ceiling[j/2], 2], {i, 8}, {j, 8}],
PixelConstrained -> 8, Mesh -> True]
Setting Frame->True
instead shortens the first row and last column:
ArrayPlot[Table[Mod[Ceiling[i/2] + Ceiling[j/2], 2], {i, 8}, {j, 8}],
PixelConstrained -> 8, Mesh -> True, Frame -> True]
The only way I've found so far that solves this issue is to set the image size manually:
ArrayPlot[Table[Mod[Ceiling[i/2] + Ceiling[j/2], 2], {i, 8}, {j, 8}],
Mesh -> True, ImageSize -> 67]
However, this procedure is tedious, and has to be performed on every image separately. Plus, I don't think I can guarantee that all of the cells will have the same width and height. Is there any other way to fix this annoying imperfection? (I've had this problem since at least v7, and it's still present in v11.)