필터 지우기
필터 지우기

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 CenterFile Exchange에서 Develop 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