Filter löschen
Filter löschen

MATLAB ignores a trisurf's FaceVertexAlphaData property

1 Ansicht (letzte 30 Tage)
Jason
Jason am 9 Nov. 2023
Kommentiert: Jason am 9 Nov. 2023
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);

Akzeptierte Antwort

Walter Roberson
Walter Roberson am 9 Nov. 2023
Note
If the FaceAlpha and EdgeAlpha properties are both set to scalar values, then the patch does not use the FaceVertexAlphaData values.
  2 Kommentare
Walter Roberson
Walter Roberson am 9 Nov. 2023
[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 am 9 Nov. 2023
Ahh thank you very much. The whole surfhandle thing was a copy and paste error but I see what needs to be done.

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (0)

Kategorien

Mehr zu Develop Apps Using App Designer finden Sie in Help Center und File Exchange

Produkte


Version

R2023b

Community Treasure Hunt

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

Start Hunting!

Translated by