With the following code, the bars overlap. How to get the bars to stack on top of each other?
using CairoMakie
x = 1:10
b = barplot(x,rand(10))
barplot!(x,rand(10))
b
With the following code, the bars overlap. How to get the bars to stack on top of each other?
using CairoMakie
x = 1:10
b = barplot(x,rand(10))
barplot!(x,rand(10))
b

You can do the following based on discourse.julialang.
It is a workaround that simply adds both random values together in the first barplot, and puts the second on top.
stackdoes not work with rand directly (Makie restricts inputs ofstackanddodgeto integers) but for integers you can use the following code snippet from the documentation:Of course, if it does not have to be Makie, you can also use something like: