Layout with more than 1 variable using AoG

Hi, I want to create a panel plot using more than 1 variable. Is there a code something like this that works for the same? Thanks!

using AlgebraOfGraphics

a = DataFrame(
    cat1 = rand([0,1], 20),
    cat2 = rand([0,1], 20),
    numcol = rand(20))
data(a) * mapping(:numcol, layout=[:cat1 :cat2] .=> nonnumeric) * visual(Hist) |> draw

Hi! Is it correct that you want to facet by cat1 and cat2 and git histograms within each bin?


Yes, that is correct.

For example, in R, I would do:

ggplot(a) + geom_histogram() + facet_grid(cat1~cat2)