matlab: how to use an array for coloring a plot

孤街浪徒 提交于 2019-12-10 10:59:53

问题


I have a set of 3d coordinates in 3 arrays X, Y, Z, and the temperature T at each point. I want to plot the points as a point cloud, such that each point will have a color according to it's temperature. Something similar to how you can specify colors in trisurf. How do I do that?


回答1:


You can use SCATTER3 for that:

scatter3(X,Y,Z,12,T);


来源:https://stackoverflow.com/questions/6570563/matlab-how-to-use-an-array-for-coloring-a-plot

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!