How can I plot 3D data as a 2D grid plot in Python?
Similar to hist2D
where the third dimension is not frequency but my own data. Let me illustrate:
import numpy as np
import matplotlib.pyplot as plt
# Making some points
npoints = 500
x = np.random.uniform(low=0, high=3, size=npoints)
y = np.random.uniform(low=-3, high=3, size=npoints)
z = np.random.uniform(low=0, high=10, size=npoints)
# plot X Y Z as a grid plot
# like plt.hist2d(x, y) but where frequency = z
plt.colorbar()
plt.show()
Similar question but didn't help: Color 2D Grid with values from separate 2D array