Repeat histogram

Source code Author

using Deneb

data = Data(url="https://vega.github.io/vega-datasets/data/cars.json")

chart = Data(data) * Mark(:bar) * Repeat(
    ["Horsepower", "Miles_per_Gallon", "Acceleration", "Displacement"],
    columns=2
) * Encoding(
    x=(field=(;repeat=:repeat), bin=true),
    y="count()",
    color=:Origin,
)

This page was generated using DemoCards.jl and Literate.jl.