Search code examples
arraysplotwolfram-mathematica

Need to highlight a certain element in array plot in mathematica


The array plot is constructed using a list. I want to mark the max intensity element with a red pointer. Is it possible?


Solution

  • Is this what you are looking for

    m = {{1, 0, 0, 0.3}, {2, 7, 0, 0.3}, {1, 0, 1, 0.7}};
    ArrayPlot[m /. Last[Sort[Flatten[m]]] -> Red]
    

    enter image description here