xy = np.random.random((50,3))
x = xy[:,0]
y = xy[:,1]
z = xy[:,2]*100
plt.scatter(x,y,c=z, cmap="Reds")
I have the above data, as can be seen they all have a x and y position along with a value this being conveyed by the colour of the data dot.
From this i want to create a heatmap / density map where the areas near dots are effected by it.
I have tried making heatmaps with ax.histogram2d()
but the problem I have is to make the values affect "nearby areas"
Example of what it looks like now so I would need the bins to effect their nearby bins
heatmap, xedges, yedges = np.histogram2d(x, y, weights=z, bins=(50,50))
extent = [0, 1, 0, 1]