I have some data of the following type: grid = np.array([posx, posy]) where posx and posy are the X/Y position some, stored in another array. The (transposed) grid may look like:
grid = np.array([posx, posy])
print grid.T
[[ 2.47685286 2.51629155]
[ 2.47685286 8.51629155]
[ 2.47685286 14.51629155]
[ 8.47685286 5.51629155]
[ 8.47685286 11.51629155]
[ 14.47685286 2.51629155]
[ 14.47685286 8.51629155]
[ 14.47685286 14.51629155]]
Especially the y-Position is not identical in each "row" and the number of points differs, which I assume to be one of my problems.
Additionally, the corresponding data is stored in another (1D-)array like data = [2.3 4.7 -0.3 .....] having the same amount of entrys as I have points. My aim is to plot this data in kind of a smooth heatmap displaying by colours indicating position of high / low values. So far I used:
import numpy as np
import matplotlib.pyplot as p
p.imshow(data, interpolation=None)
p.colorbar()
p.show()
Obviously my problem is that I need to adjust the positon of my points. I searched some other posts but with this shape of data it never worked out. Also I tried to adjust this by simply reshaping the data but this didn't work due to the irregular number of points
As I am new here I am also happy for comments on how to improve my post (more input needed etc.) Thanks in advance!
