# Colorize specific region in plane

The plane is divided into a grid and points is distributed on it.

num = 100;
r = N[1/20];
points = RandomReal[{0, 1}, {num, 2}];
fig = ListPlot[points, GridLines -> {Range[0, 1, r], Range[0, 1, r]},
PlotMarkers -> {Automatic, 3.5}, PlotStyle -> Red,
ImageSize -> 1000]


I am interested in colorizing specific regions in the plane.

fig2 = Graphics[{Green, Rectangle[]},
PlotRange -> {{0.7, 0.4}, {0.75, 0.45}}]
Show[fig2, fig]


But someting go wrong, any sugestion on how to do it correct? Aditionlly how to extend it to few squares in plane?

• The problem is that options in the first item in Show override options given in the later ones. In this case, the settings for axes and gridlines are taken from fig2, i.e. are not included at all. The plot range of fig2 becomes the plot range for the combined figure. – C. E. Sep 7 '19 at 19:33

num = 100;
coord = {{0.7, 0.4}, {0.75, 0.45}};