热图表示三维数据
1.
plt.figure()
Y = np.random.normal(loc=0.0, scale=1.0, size=10000
)
X = np.random.random(size=10000
)
_ = plt.hist2d(X, Y, bins=25)
2.改变bin的数量
plt.figure()
_ = plt.hist2d(X, Y, bins=100
)
# add a colorbar legend
plt.colorbar()
转载于:https://www.cnblogs.com/Shinered/p/9530776.html