{
const a = Plot.plot({
className: "custom",
grid: 30,
insetTop: 10,
marks: [
Plot.ruleY([0]),
Plot.rectY(
data,
Plot.binX({ y: "sum" }, { x: "flipper_length_mm", thresholds: bins })
)
]
});
d3.select(a).append("style").text(`
.custom g:nth-child(2) g.grid path { stroke: green; stroke-opacity: .5; stroke-width: 4 }
.custom g:nth-child(3) g.grid path { stroke: red; stroke-opacity: .5; stroke-width: 4 }
`);
return a;
}