Plot.plot({
marginLeft: 75,
marginRight: 70,
x: { insetRight: 10 },
facet: { data: penguins, y: "island", marginRight: 70 },
marks: [
Plot.frame(),
Plot.barX(
penguins,
Plot.groupY({ x: "count" }, { y: "species", fill: "sex" })
),
Plot.text(["Torgersen only has Adelie penguins!"], {
frameAnchor: "top-right",
dx: -10,
fy: ["Torgersen"]
})
]
})