Surf plot mesh looks jagged when I set FaceAlpha
7 ビュー (過去 30 日間)
古いコメントを表示
Below is the example given in the "surf" documentation. The mesh looks smooth when `FaceAlpha` is not included but it looks jagged when it's transparent. Is this a graphics card issue or can it somehow be fixed?
[X,Y] = meshgrid(-5:.5:5);
Z = Y.*sin(X) - X.*cos(Y);
s = surf(X,Y,Z,'FaceAlpha',0.5)
2 件のコメント
Walter Roberson
2018 年 5 月 12 日
Let me think... You are using r2013b or r2014a or so? If so then there was bug having to do with opengl use, which gets enabled automatically when alpha is used.
採用された回答
Leone Campos
2021 年 8 月 10 日
opengl hardwarebasic
Code
opengl hardwarebasic
% opengl hardware
% opengl software
[X,Y] = meshgrid(-5:.5:5);
Z = Y.*sin(X) - X.*cos(Y);
s = surf(X,Y,Z,'FaceAlpha','0.5')
With software
![software](https://www.mathworks.com/matlabcentral/answers/uploaded_files/708657/software.png)
With hardware
![hardware](https://www.mathworks.com/matlabcentral/answers/uploaded_files/708662/hardware.png)
With hardwarebasic
![hardwarebasic](https://www.mathworks.com/matlabcentral/answers/uploaded_files/708667/hardwarebasic.png)
その他の回答 (1 件)
Jan
2018 年 5 月 12 日
It looks nice in my Matlab 2016b/Win10. Setting the Alpha blending enables the OpenGL renderer. If this causes troubles, try:
opengl software
Does this help? Do you have the current versions of the drivers installed? Which OS are you using? Can you post a screenshot such that "looks jagged" gets more clear?
3 件のコメント
参考
カテゴリ
Help Center および File Exchange で Graphics Performance についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!