# How to combine MatrixPlot with ListPlot

I want to combine a ListPlot with a MatrixPlot.

I have a set of points to be used with a ListPlot. At the same time, I want to show a kind of heat map to show the intensity of their locations in a grid style map.

So, for example I have the data points:

data = {{1,2},{3,4},{5,6}}


where the maximum and minimum of both x and y values are 0 and 10, respectively. Now I want to show that same points in a heat map of a 4x4 grid:

MatrixPlot[{{0, 1, 1, 0}, {0, 1, 1, 0}, {0, 1, 1, 0}, {0, 1, 1, 0}}]


where the matrix element (4,0) (lower left corner) corresponds to the (0,0) and the element (0,4) (upper right corner) corresponds to the (10,10) position.

Any idea on how shall I combine them? I'm aware of this answer but I confess I didn't understand it fully. But I suspect it does not fit to my case.

• Maybe ArrayPlot ? Oct 23 '20 at 14:55
• I think the problem is the same. Because the problem here is the combination. I want to show the heat map and on top of it the data that would go to ListPlot. Oct 23 '20 at 15:01

Show[{MatrixPlot[{{0, 1, 1, 0}, {0, 1, 1, 0}, {0, 1, 1, 0}, {0, 1, 1,