"m" is an GPS coordinates array defined in https://www.dropbox.com/s/vua4nakd8sz3ocy/data.py?dl=0
I can use the matplotlib function
hist2d(zip(*m)[0],zip(*m)[1], bins=60, cmap='jet', normed=True)
to produce the correct density heatmap.
However, if I use this way:
x,y = zip(*m)[:2]
heatmap, xedges, yedges = np.histogram2d(x,y,bins=50)
extent = [xedges[0], xedges[-1], yedges[0], yedges[-1]]
clf()
scatter(x,y,c='k')
imshow(heatmap, extent=extent, cmap='jet')
It produces the obviously wrong heatmap. Why this happen?
The black points are the GPS points.