AlgebraOfGraphics: how to add xlabel and ylabel

I couldn’t find an example of how to add an x-axis label to the algebra flow.
For example, in this simple plot, how would I add a “Number of cylinders” x label to both subfigures?

using RDatasets: dataset
using AlgebraOfGraphics, CairoMakie
mpg = dataset("ggplot2", "mpg");
mpg.IsAudi = mpg.Manufacturer .== "audi"
geom = visual(BoxPlot, layout_x = 1) + visual(Violin, layout_x = 2)
data(mpg) *
    mapping(:Cyl => categorical, :Hwy) *
    mapping(dodge = :IsAudi => categorical, color = :IsAudi => categorical) *
    geom |> draw

I don’t think this is easily possible. Depending on what you need, you can try GitHub - greimel/TabularMakie.jl: Makie plots with legends and labels and everything where you can rename variables on the fly.

(Dodged violin plots will probably not work though)

Yes, “plotting from tables” in the Makie ecosystem is still being worked on. I think you are hitting a bug (I’ve filed missing x label for horizontally concatenated plots · Issue #147 · JuliaPlots/AlgebraOfGraphics.jl).

If you only do one plot, eg geom = visual(BoxPlot), you should get Cyl as x axis. It can be renamed by renaming the dataframe column. greimel/TabularMakie.jl lets you do this on the fly. I still have to get around to an AlgebraOfGraphics revamp, trying to include the work done in TabularMakie.