From plot3 to surface plot

11 次查看(过去 30 天)
Niklas
Niklas 2016-5-25
I have plotted x,y,z cordinates in a plot3 seen in figure. How can I do a surface plot from these values.

回答(1 个)

Walter Roberson
Walter Roberson 2016-5-25
  2 个评论
Michael Rivera
Michael Rivera 2017-9-20
I don't think any of the above links helps. The organization of the data (x,y,z) passed to plot3 is different from that of surf. If you have data organized such that it works with plot3, it does not work with surf. The problem is how to reorganize data that works with plot3 so it will work with surf.
Walter Roberson
Walter Roberson 2017-9-20
We see a scattered plot, with no lines at all. We see colored markers that are not the same along any of the visual vertical lines, from which we know that the verticals were not plotted as x, y, z vectors (because only one color is possible per vector). The colored markers are not in consistent vertical order between any of the visual vertical lines, from which we know that rings were not plotted as x, y, z vectors (because only one color is possible per vectors). From these facts we deduce that if plot3() was used at all, it was used to plot scalars (the plot could also have been created by scatter3()).
Now that we know scalars were used for each plot3() call, the plot3() calls together were equivalent to plotting a point cloud.
The evidence of the marker color having no apparent order (though it might possibly be unique per visual vertical) tells us that there is little to no useful connection information to be gained by analyzing the colors of adjacent points: we might as well just treat it as a point cloud.
The routines I linked to analyze point clouds to create surface drawings, creating the face and vertex information needed for appropriate surface patches.

请先登录,再进行评论。

类别

Help CenterFile Exchange 中查找有关 Surface and Mesh Plots 的更多信息

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by