I am trying to get a heatmap kind of color map with known values at points in plane which are spread non-uniformly (i.e., not uniform or not in grid form)
import numpy as np
x = np.random.rand(100)
y = np.random.rand(100)
z = np.random.rand(100)
Here, Using x, y and z, I want a plot showing intensity z[i] at point coordinates (x[i], y[i])
I tried using pcolor mesh of matplotlib as follows
import matplotlib.pyplot as plt
plt.figure()
plt.pcolormesh(x.reshape(10, 10), y.reshape(10, 10), z.reshape(10, 10))
plt.colorbar()
plt.show()
But this is giving the following error,
UserWarning: The input coordinates to pcolormesh are interpreted as cell centers, but are not monotonically increasing or decreasing. This may lead to incorrectly calculated cell edges, in which case, please supply explicit cell edges to pcolormesh.
