How to convert 3d scattered points to coloured map?
2 ビュー (過去 30 日間)
古いコメントを表示
Ayham Aljawabrah
2020 年 11 月 3 日
コメント済み: Ayham Aljawabrah
2020 年 11 月 10 日
I have three column vectors xp, yp, zp, where each column set of these vectors form the coordinate for a point in 3d space. I used plot3 function to plot the scattered points. however, the result showed that my points has a pattern as shown in the attached figure. I am seeking for a method to let the scattered points have colour rather than one colour plot. it is not possible to look after each point and colour it according to its z-value, even with for loop, because I have large number of points
0 件のコメント
採用された回答
Walter Roberson
2020 年 11 月 3 日
編集済み: Walter Roberson
2020 年 11 月 9 日
scatter3(x, y, z, pointsize, color)
The color can be the z if appropriate.
If each of the "sheets should be a different color then that could be more difficult. Perhaps using a k nearest neighbor search and some kind of region growing?
Perhaps knnsearch of random point, fit a plane, find all points within a distance of that plane, consider them to be part of the same plane, associate a label, remove those from the active set, repeat with remaining points?
3 件のコメント
Walter Roberson
2020 年 11 月 9 日
knnsearch() for points of dimension up to 10 does not require computing the distance of every point to every other point. For dimension 3 like you are using, knnsearch would effectively form an octree first, and that is fast to search.
その他の回答 (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!