From plot3 to surface plot
11 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
I have plotted x,y,z cordinates in a plot3 seen in figure. How can I do a surface plot from these values.

0 comentarios
Respuestas (1)
Walter Roberson
el 25 de Mayo de 2016
One of these might help:
2 comentarios
Michael Rivera
el 20 de Sept. de 2017
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
el 20 de Sept. de 2017
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.
Ver también
Categorías
Más información sobre Surface and Mesh Plots en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!