Open ph-kev opened 2 days ago
Can confirm this is a bug, but only on CairoMakie (not GLMakie)
Strangely enough, I can't replicate this with mesh
- it seems to be an issue specific to surface
.
Mesh example:
using CairoMakie
vertices = [
0.0 0.0 0.0;
1.0 0.0 0.0;
1.0 1.0 0.0;
0.0 1.0 0.1;
] # points are 3D to make sure this goes through `draw_mesh3d`
faces = [
1 2 3;
3 4 1;
]
colors = [1.0, 2.0, 3.0, NaN]
scene = mesh(vertices, faces, color = colors, shading = NoShading, nan_color = :red)
Surface example:
using CairoMakie
surface([1.0 2.0 3.0 4.0 5.0; 3.0 4.0 NaN 4.0 5.0; 1.0 2.0 3.0 4.0 5.0] ./ 10; nan_color = :red)
so clearly something fishy is going on here.
]st -m Makie
)I am using Makie v0.21.14
]activate --temp; add Makie
)I can reproduce the bug with a fresh environment. The bug is that
nan_color
do not work as expected. I would expect the color of theNaN
to be red and not transparent.The code above produce the plot below.