Plot.plot({
marginTop: 18,
marks: [
Plot.tickX(penguins, {
x: "culmen_length_mm"
}),
Plot.tickX(
penguins,
Plot.groupZ(
{ x: "median" },
{
x: "culmen_length_mm",
stroke: "red",
strokeWidth: 2,
inset: -8
}
)
),
Plot.text(
penguins,
Plot.groupZ(
{ x: "median", text: "median" },
{
x: "culmen_length_mm",
text: "culmen_length_mm",
frameAnchor: "top",
dy: -18,
fill: "red"
}
)
)
]
})