How can I rotate the BoxPlot with AoG?

I’m trying to reproduce the following plot using AoG customizing whatever is needed with CairoMakie properties/parameters. So, as the names are long, I need to rotate them to see better.

this plot just used coord_flip() from ggplot2 to accomplish the objective

I find the orientation=:horizontal boxplot parameter, that works with the visual step, but all the axis got broken, the numbers of axis dissapeared, as you can see below.
nd after looking for parameters of Axis in Makie API documentation, I couldn’t realize how I can solute this.

code of the plot above

plt = data(df) *
  visual(BoxPlot, show_notch=true, orientation=:horizontal) *
  mapping(:major_category, :median);

I appreciate any help with this, tks.

I don’t think AoG can do this right now, unfortunately. That’s because it assumes that the first argument is x, the second y, even though the barplot attribute switches that around.

I see.
Thanks for the answer.

This case looks good to create an issue, do you know if it already exists or can I go ahead and create one?

I’m not a hundred percent sure but there’s probably an issue by me about this :smile:

1 Like

Did you know if I can do this using CairoMakie?

any instruction will help. tks

julia> categories = repeat(1:3, inner = 100); data = randn(300) .* categories;

julia> boxplot(
           orientation = :horizontal,
           color = :white,
           strokecolor = :black,
           strokewidth = 1.5,
           outliercolor = :black,
           axis = (; yticks = (1:3, ["A", "B", "C"]))

1 Like