How to plot surface with contour form vertices?

3 ビュー (過去 30 日間)
Teerapong Poltue
Teerapong Poltue 2021 年 7 月 9 日
編集済み: Teerapong Poltue 2021 年 7 月 11 日
I got the vertices for my 3D surface and its value that need to be contoured.
I wonder how to do a surface plot with contour?
I found a simple way to do it with a scatter plot, but I don't know how to implement the code to be surface.
x = data(:,1);
y = data(:,2);
z = data(:,3);
d = data(:,4);
marker_size = 10;
scatter3(x,y,z,marker_size,d,'filled');
view(3)
daspect([1 1 1])
colorbar
axis tight
camlight
lighting gouraud

採用された回答

LO
LO 2021 年 7 月 9 日
try this
https://de.mathworks.com/matlabcentral/fileexchange/5105-making-surface-plots-from-scatter-data
  2 件のコメント
Teerapong Poltue
Teerapong Poltue 2021 年 7 月 10 日
Unfortunately, it didn't work in this case since there are multiple z value in single x and y coordinate.
LO
LO 2021 年 7 月 10 日
try to combine this
with this
Or see also this answer by KSSV
%%structured
xi = unique(x) ; yi = unique(y) ;
[X,Y] = meshgrid(xi,yi) ;
Z = reshape(z,size(X)) ;
figure
surf(X,Y,Z)
%%unstructured
dt = delaunayTriangulation(x,y) ;
tri = dt.ConnectivityList ;
figure
trisurf(tri,x,y,z)

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeLighting, Transparency, and Shading についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by