Facet view

Source code Author

using Deneb

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

chart = Data(data) * Mark(:bar) * Facet(column=:Origin) * Encoding(
    x=field("Horsepower:Q", bin=(;maxbins=15)),
    y="count()"
) * vlspec(
    height=200, width=200
)

column as an encoding channel:

chart = Data(data) * Mark(:bar) * Encoding(
    x=field("Horsepower:Q", bin=(;maxbins=15)),
    y="count()",
    column=:Origin,
) * vlspec(
    height=200, width=200
)

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