I would like to plot a 2d map in Makie, where I can specify exactly a color in each rectangle. Something like a heatmap, where the color would be prescribed and not taken from a colormap. I have tried to fudge the heatmap, but the results looks weird. Let me provide a simple example of what I have on mind.
using GLMakie
x = [1, 1, 1, 2, 2, 2, 3, 3, 3];
y = [1, 2, 3, 1, 2, 3, 1, 2, 3];
z = [:black, :teal, :brown :gold, :wheat, :green, :red, :blue, :yellow]
heatplot(x, y, z)
Thank you both guys. I know the community will not betray me.
As an expression of gratitude, yesterday, I showed some plots to the die hard matplotlib / tikz guys and they were impressed by quality of Makie plots.
The accepted solution does not use the list of input points as in OP.
One of the advantages of using meshscatter() with an arbitrary list of input points is that the squares do not need to match a matrix grid, and can be anywhere. Furthermore, we can control the size of the squares. An example with an extra pink square: