フィルターのクリア

Facealpha bug in combination with 3D plots

2 ビュー (過去 30 日間)
Maruan Alberto Bracci
Maruan Alberto Bracci 2023 年 2 月 9 日
回答済み: Voss 2023 年 2 月 9 日
when this three elements are combined, the smotthing of lines is lost.
- patch or fill3
- lines in the z axis (either with line or plot3)
- alpha (like FaceAlpha)
Examples:
figure() %line smoothing is OK
fill3([0 1 1 0],[0 0 1 1],[0 0 0 0],'b')
hold on
plot3([0; 0],[0; 0],[0; 1],'color','#D95319','LineWidth',1.5)
figure() %no line smoothing
patch([0 1 1 0],[0 0 1 1],'b','Facealpha',.5)
view([30 30])
line([0; 0],[0; 0],[0; 1],'color','#D95319','LineWidth',1.5)
as well:
figure() %no smoothing
fill3([0 1 1 0],[0 0 1 1],[0 0 0 0],'b','Facealpha',.5)
hold on
plot3([0; 0],[0; 0],[0; 1],'color','#D95319','LineWidth',1.5)
Do you have the same behaviour?

回答 (1 件)

Voss
Voss 2023 年 2 月 9 日
You might try using the painters Renderer. See below for a comparison of those three cases with painters vs the default OpenGL Renderer.
figure('Renderer','OpenGL')
fill3([0 1 1 0],[0 0 1 1],[0 0 0 0],'b')
hold on
plot3([0; 0],[0; 0],[0; 1],'color','#D95319','LineWidth',1.5)
figure('Renderer','Painters')
fill3([0 1 1 0],[0 0 1 1],[0 0 0 0],'b')
hold on
plot3([0; 0],[0; 0],[0; 1],'color','#D95319','LineWidth',1.5)
figure('Renderer','OpenGL')
patch([0 1 1 0],[0 0 1 1],'b','Facealpha',.5)
view([-37.5 30])
line([0; 0],[0; 0],[0; 1],'color','#D95319','LineWidth',1.5)
figure('Renderer','painters')
patch([0 1 1 0],[0 0 1 1],'b','Facealpha',.5)
view([-37.5 30])
line([0; 0],[0; 0],[0; 1],'color','#D95319','LineWidth',1.5)
figure('Renderer','OpenGL')
fill3([0 1 1 0],[0 0 1 1],[0 0 0 0],'b','Facealpha',.5)
hold on
plot3([0; 0],[0; 0],[0; 1],'color','#D95319','LineWidth',1.5)
figure('Renderer','painters')
fill3([0 1 1 0],[0 0 1 1],[0 0 0 0],'b','Facealpha',.5)
hold on
plot3([0; 0],[0; 0],[0; 1],'color','#D95319','LineWidth',1.5)

カテゴリ

Help Center および File ExchangeSurface and Mesh Plots についてさらに検索

製品


リリース

R2021a

Community Treasure Hunt

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

Start Hunting!

Translated by