I would like to plot a heatmap for x, y, intensity
coordinates, similar to this question: Plotting a Heat Map X,Y,Intensity From Three Lists
In my case, the data is not ordered and therefore the x and y coordinates cannot simply be reshaped into a mesh grid.
I would like to convert this:
x,y,intensity = [1, 1, 0.4
1, 0, 0.1
2, 2, 0.6
... ]
to this:
intensity = [0.0, 0.1, 0.0
0.0, 0.4, 0.0
0.0, 0.0, 0.6
... ]
So my question is: how can I plot my intensity values for the x and y coordinates on a mesh grid? I also tried to use a for loop but could not find the right way to sort the data correctly.
The final result will be used to show x,y and color values in pcolormesh.