How to create a 3d Heatmap from a discrete data set in Python?

前端 未结 1 1189
春和景丽
春和景丽 2021-01-03 15:59

I have a large dataset of the form [(X1, Y1, Z1, VALUE1), (X2, Y2, Z2, VALUE2)...]. The geometry of the points is the surface of a cylinder, while there are many discrete po

相关标签:
1条回答
  • 2021-01-03 16:38

    Depending on how dense your point cloud is you may be able to get what you want with this (adjust the size parameter, s, to fill out the plot best for your data):

    from mpl_toolkits.mplot3d import Axes3D
    fig = plt.figure()
    ax = fig.gca(projection='3d')
    ax.scatter(X, Y, Z, c=Value, lw=0, s=20)
    plt.show()
    

    0 讨论(0)
提交回复
热议问题