「m」は、https://www.dropbox.com/s/vua4nakd8sz3ocy/data.py?dl=0で定義されている GPS 座標配列です。
matplotlib 関数を使用できます
hist2d(zip(*m)[0],zip(*m)[1], bins=60, cmap='jet', normed=True)
正しい密度ヒートマップを生成します。
ただし、この方法を使用する場合:
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')
明らかに間違ったヒートマップを生成します。なぜこれが起こるのですか?
黒い点は GPS ポイントです。