# Plot the indices of the background Matrix instead of the calculated values

I want to create a background 60*100 matrix and insert inside it the calculated values, for example

data = {{1, 60.51}, {2, 24.5115}, {3, 9.92919}, {4, 4.02214}, {5, 1.6293}, {6, 0.66}}


The rest elements of the matrix are zeros. Then instead of plotting data I want to plot their corresponding indices in the matrix. The result should look like this: • I don't understand what you're asking for here. Could you give some more detail about what you need? Preferably a minimal example of the input and desired output? Nov 26, 2020 at 10:24
• @SjoerdSmit thanks! I updated the question by adding a photo as an example. Nov 26, 2020 at 10:46

array = Array[Subscript[m, ##] &, {8, 5}];
{checkmark, dot} = {"✓", "\[FilledSmallCircle]"};

labeledcells = Join[Thread[{1, Range}], {{2, 1}, {8, 1}}];
markedcells = {{2, 2}, {4, 3}, {6, 5}};
dottedcells = Complement[Tuples[{Range, Range}], labeledcells, markedcells];

array2 = ReplacePart[array, {markedcells :> checkmark, dottedcells :> dot}];

MatrixForm[array2] ArrayPlot[array2 /. {dot -> White, checkmark -> Green, _Subscript -> Red},
Mesh -> All, Frame -> True, FrameTicks -> Automatic,
Epilog -> MapIndexed[Text[Style[#, 16, Black], #2 - .5] &,
Reverse /@ Transpose @ array2, {2}]] • Thanks! How to over-plot the x and y axes with ticks? Nov 26, 2020 at 14:16
• @Shaaban, just add the options Frame -> True and FrameTicks -> Automatic.
– kglr
Nov 26, 2020 at 17:39