I want to understand why the order of the text is reversed from what it should be? If I compare the first and second results, I see that the {1,1}, {2,2},... diagonal is going down the wrong diagonal. How could I alter this, such that the order is correct? For reference, here is the original question...ArrayPlot with cells labeled by corresponding values
SeedRandom[41, Method -> "Legacy"];(*for reproducibility*)
mat = RandomReal[1, {4, 4}]
ArrayPlot[
mat,
Epilog -> {Red, MapIndexed[
Text[#1, Reverse[#2 - 1/2]] &, mat, {2}]},
Mesh -> True, ImageSize -> 400]
mat = RandomReal[1, {4, 4}]
ArrayPlot[
mat,
Epilog -> {Red, MapIndexed[
Text[#2, Reverse[#2 - 1/2]] &, mat, {2}]},
Mesh -> True, ImageSize -> 400]
Reverse
. Reread J.M.'s answer, he usesReverse[mat]
. $\endgroup$