using CairoMakie
tbl = (x = [2, 2, 2, 3, 3, 3, 1, 1, 1],
height = 0.1:0.1:0.9,
grp = [2, 1, 2, 1, 3, 2, 2, 3,1],
grp1 = [3,1, 1, 1, 3,1, 3, 1,3],
grp2 = [1, 1,3,3, 1, 1, 1, 3, 1]
)
barplot(tbl.x, tbl.height,
dodge = tbl.grp1,
stack = tbl.grp2,
color = tbl.grp,
axis = (xticks = (1:3, ["left", "middle", "right"]),
title = "Dodged and stacked bars"),
)
