Hi everyone,
I’m encountering different transparency behavior between CairoMakie and GLMakie when combining scatter plots with mesh plots.
Expected behavior: scatter plot points behind a mesh should be hidden (like in GLMakie).
Observed behavior: in CairoMakie, the points behind the mesh remain fully visible.
Is there a way to get the expected behavior though CairoMakie? I need to make the plots on a cluster in which GLMakie is not available.
Example:
using CairoMakie, FileIO, GeometryBasics
# switch to GLMakie for expected outcome
mesh = load(assetpath("brain.stl"))
v = coordinates(mesh)
f = faces(mesh)
pltrand = v[rand(eachindex(v), 10)]
fig = Figure();
ax = Axis3(fig[1, 1], aspect=:data)
mesh!(ax, v, f, color=:lightblue)
scatter!(ax, pltrand, color=:red)
fig