hexbin和histogram2d有什麼區別?hexbin和histogram2d的不同行爲
f, (ax1,ax2) = plt.subplots(2)
ax1.hexbin(vradsel[0], distsel[0],gridsize=20,extent=-200,200,4,20],cmap=plt.cm.binary)
H, xedges, yedges =np.histogram2d(vradsel[0], distsel[0],bins=20,range=[[-200,200],[4,20]])
ax2.imshow(H, interpolation='nearest', cmap=plt.cm.binary, aspect='auto',extent=[xedges[0],xedges[-1],yedges[0],yedges[-1]])
plt.show()
您可以看到histogram2d給出了-90度的旋轉。我知道數據應該像hexbin圖。
什麼,如果你比較'ax1.hexbin()''到ax2.hist2d( )'? – askewchan
是的,這是區別。這兩個是一樣的。我現在沒有imshow()繪製其他東西,然後我的預期。 – Mathias711