5
$\begingroup$

In a MatrixPlot (1,1) is in the NW corner. Is it possible to have it in the SW one ?

$\endgroup$

1 Answer 1

9
$\begingroup$

Use the DataReversed option of MatrixPlot,

mat = ConstantArray[0, {4, 4}];
mat[[;; 2, ;; 2]] = {{1, 2}, {3, 0}};
MatrixPlot[mat, DataReversed -> #] & /@ {{False, False}, 
   {False, True}, {True, False}, {True, True}}

Mathematica graphics

$\endgroup$
1
  • $\begingroup$ I think it will be more clear if you have mat[[{1, 2}, {1, 2}]] = {{1, 2}, {3, 0}}; $\endgroup$
    – BlacKow
    Commented Oct 17, 2016 at 17:47

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.