フィルターのクリア

MATLAB ignores a trisurf's FaceVertexAlphaData property

1 回表示 (過去 30 日間)
Jason
Jason 2023 年 11 月 9 日
コメント済み: Jason 2023 年 11 月 9 日
In this MWE, Matlab completely ignores my alpha settings. Am I forgetting something or is this a bug?
[x,y] = meshgrid(0:10);
DT = delaunayTriangulation([x(:) y(:)]);
xx = DT.Points(:,1);
yy = DT.Points(:,2);
surfHandle.FaceAlpha = 'flat';
surfHandle.AlphaDataMapping = 'none';
srf = trisurf(DT.ConnectivityList,xx,yy,ones(size(xx)));
srf.FaceVertexAlphaData = rand(size(srf.Faces,1),1);

採用された回答

Walter Roberson
Walter Roberson 2023 年 11 月 9 日
Note
If the FaceAlpha and EdgeAlpha properties are both set to scalar values, then the patch does not use the FaceVertexAlphaData values.
  2 件のコメント
Walter Roberson
Walter Roberson 2023 年 11 月 9 日
[x,y] = meshgrid(0:10);
DT = delaunayTriangulation([x(:) y(:)]);
xx = DT.Points(:,1);
yy = DT.Points(:,2);
srf = trisurf(DT.ConnectivityList,xx,yy,ones(size(xx)));
srf.FaceAlpha = 'flat';
srf.AlphaDataMapping = 'none';
srf.FaceVertexAlphaData = rand(size(srf.Faces,1),1);
Whatever surfHandle is, it is nothing to do with srf
Jason
Jason 2023 年 11 月 9 日
Ahh thank you very much. The whole surfhandle thing was a copy and paste error but I see what needs to be done.

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

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeDevelop Apps Using App Designer についてさらに検索

製品


リリース

R2023b

Community Treasure Hunt

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

Start Hunting!

Translated by