热图表示三维数据

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)

matplotlib--heatmap

2.改变bin的数量

plt.figure()
_ = plt.hist2d(X, Y, bins=100)

# add a colorbar legend
plt.colorbar()

matplotlib--heatmap

相关文章:

  • 2022-12-23
  • 2021-11-12
  • 2022-01-03
  • 2021-10-29
  • 2022-12-23
  • 2022-12-23
  • 2021-12-13
  • 2021-10-02
猜你喜欢
  • 2021-06-23
  • 2022-12-23
  • 2021-08-28
  • 2022-12-23
  • 2021-08-21
  • 2022-12-23
  • 2021-05-11
相关资源
相似解决方案