MATLAB: Plot Grid points with different colours

2_d plotcolourmapgridplot areasplot points

Hello Everyone
I have two variables
x = linspace(0,25,26)
y = linspace(0,25,26)
and i want to create a graph with x,y axis
where the points where the x<y are going to be coloured in red. Also the points where x > 16 i want the points to be shown in black colour.
Could someone plz guide me on what method to use? I have made a code that creates a grid but i dont know hot to celect these points abd give them the appropriate colour.
Thank you

Best Answer

Thank you very much! However y is also 1:20 And I need to show all the points of the x,y plot . Should I use area plot to show the whole Area or is it a way that I can show all all points of the x,y plot ?