Skip to content

Instantly share code, notes, and snippets.

@jkrumbiegel
Created July 18, 2025 09:31
Show Gist options
  • Save jkrumbiegel/dfbb81419061d6aa27533aea01bb73b6 to your computer and use it in GitHub Desktop.
Save jkrumbiegel/dfbb81419061d6aa27533aea01bb73b6 to your computer and use it in GitHub Desktop.
dodged bar smaller bar inside AlgebraOfGraphics
mapping(
["X", "X", "X"],
[1, 2, 3],
dodge = ["A", "B", "C"],
color = ["A", "B", "C"],
) * visual(BarPlot, direction = :x) +
mapping(
["X", "X", "X"],
[0.7, 1.5, 2.2],
dodge = ["A", "B", "C"],
) * visual(BarPlot, width = 0.8, dodge_gap = 0.3, direction = :x) |> draw(scales(DodgeY = (; width = 1.0)))
@jkrumbiegel
Copy link
Author

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment