Hi, I am trying to generate a barplot using CairoMakie which would consist two sets of bars each with a different transparency. So far I am not sure how to achieve that.
MWE below depicts the barplot I am generating so far
import CairoMakie, Random;
n_A, n_B, n_C = 6, 2, 3;
fig = CairoMakie.Figure();
ax = CairoMakie.Axis(fig[1, 1],
xlabel="xlabel", ylabel = "ylabel",
);
barplot = let
Random.seed!(0)
data = rand(n_A, n_B * n_C)
xs = repeat(1:n_A, n_B * n_C)
dgd = repeat(repeat(1:n_B, inner=n_A), n_C)
stk = clr = repeat(1:n_C, inner=n_A * n_B)
CairoMakie.barplot!(
ax,
xs, data[:],
dodge=dgd, stack=stk, color=clr,
direction=:x,
)
end;
display(fig)
CairoMakie.save("test.png", fig);
In this barplot there are six pairs of stacked bars and I would like to have one transparency for the first stacked bar of the pairs and another for the second. I would really appreciate if one could point me in the right direction.