When making a surface plot from scattered 3D data
8 ビュー (過去 30 日間)
古いコメントを表示
Hi have some scattered 3D data which I want to make a surface plot.
The scattered data looks like the following.

it looks like some sort of cliff or headland. Now I want to make a surface plot from these data, so I used griddata() The code is the following
[xq, yq] = meshgrid(-95:2:190, 20:0.5:170);
vq = griddata(XYZ(:,1),XYZ(:,2),XYZ(:,3),xq,yq,'natural');
surf(xq, yq, vq); %XYZ is the 3 column array contains the scattered data
The result looks like the picture below.

However, I'm not satisfied with the result because of the wriggling valley between peaks. In other words, I wanted points with same height to be connected smoothly on the surface, which might look like the following picture.

Please notice the difference at the picture which is highlighted in red color. There is no valley between peaks like surface plot.
So my question is, how do I make a surface plot like the 3d plot at the bottom? For those who want to try, I'll attach the scattered data file.
Thanks.
1 件のコメント
Piyush Sharma
2020 年 11 月 14 日
Hello there, I want to achieve the same thing. Can i ask you how did you plot the points?
回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Scatter Plots についてさらに検索
製品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!