Borrar filtros
Borrar filtros

Facealpha bug in combination with 3D plots

2 visualizaciones (últimos 30 días)
Maruan Alberto Bracci
Maruan Alberto Bracci el 9 de Feb. de 2023
Respondida: Voss el 9 de Feb. de 2023
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?

Respuestas (1)

Voss
Voss el 9 de Feb. de 2023
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)

Categorías

Más información sobre Surface and Mesh Plots en Help Center y File Exchange.

Productos


Versión

R2021a

Community Treasure Hunt

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

Start Hunting!

Translated by