anyway to color 2D triangular plot with "CData"
4 ビュー (過去 30 日間)
古いコメントを表示
Hi:
I have a 2D triangulation data including vertices and connectivity, I want to color it with the value at its geometry center. I tried to add a "CData" but it is not recognized by "triplot" function:
Tri=triplot(DT.ConnectivityList,DT.Points(:,1),DT.Points(:,2),'CData',cm);
where DT is the triangulation objective, and cm is the color at each triangle center.
is there anyway in Matlab can do this?
Thanks!
Yu
0 件のコメント
回答 (1 件)
KSSV
2020 年 12 月 13 日
編集済み: KSSV
2020 年 12 月 13 日
Read about trisurf. Also have a look on patch. You can use any of the two to achieve what you want.
2 件のコメント
KSSV
2020 年 12 月 14 日
Tri=trisurf(DT.ConnectivityList,DT.Points(:,1),DT.Points(:,2),cm);
I am assuming that cm is a column array with same number of rows present in Dt.Points.
参考
カテゴリ
Help Center および File Exchange で Surface and Mesh Plots についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!