Hello,
I’ve been try make heatmaps using colormaps that go from transparent to either white or black.
The interpolation works as expected for black but it looks terrible for white.
Here’s some sample code with the result:
using CairoMakie, Plots
xs = LinRange(0, 10, 100)
ys = LinRange(0,10, 100)
zs = [x+im*y for x in xs, y in ys]
rings = abs.(zs) .% 3
fig = Figure();
ax1 = fig[1, 1] = Axis( fig, backgroundcolor="blue");
ax2 = fig[2, 1] = Axis( fig, backgroundcolor="blue");
cmblack = cgrad(range(HSLA(0,0,0,0), stop=HSLA(0,0,0,1), length=100));
CairoMakie.heatmap!(ax1, xs, ys, rings, colormap=cmblack, interpolate=true);
cmwhite = cgrad(range(HSLA(0,0,1,0), stop=HSLA(0,0,1,1), length=100));
CairoMakie.heatmap!(ax2, xs, ys, rings, colormap=cmwhite, interpolate=true);
fig
What’s going on here? Is there any way to make the white colormap look like the black one?
Thanks for any help!