I have a csv table, lets say: this csv table
I'm trying to create a heat map, where the higher number the warmer color is, so the goal is to have a heat map where 20 is warm, and the 0 is blue for example. I tried a lot of heat maps but all of them are looking squared and I want it to look better like this.
I used matplot but the result looks like squares, image.
and I tried using this code where data is the table that I've shown above:
n = 1e5
Z1 = ml.bivariate_normal(data, data, 2, 2, 0, 0)
Z2 - ml.bivariate_normal(data, data, 4, 1, 1, 1)
ZD = Z2 - 21
X = data.ravel()
y = data.ravel
z = ZD.ravel gridsize=10
plt.subplot(111)
plt.hexbin(x, y, C=z, gridsize=gridsize, cmaprcm.jet, bins=None)
plt.axis ([x.min(), X.max(), y.min(), y.max()])
cb = plt.colorbar() cb.set_label('mean value') plt.show()
but it shows me a linear line (don't know why maybe because the number were divided by themself, therefore, creating a linear line)