Plot.barY(
data,
Plot.groupX(
{ y: (series) => new d3.InternSet(series).size },
{
x: "island",
y: "species",
fill: "species",
stroke: "sex",
strokeWidth: 8,
inset: 5,
z: (d) => `${d.species} - ${d.sex}`
}
)
).plot({
color: { scheme: "turbo" },
height: 200,
width: 190,
y: { ticks: 5 }
})