Plot.plot({
width: 800,
height: 500,
marks: [
Plot.dot(olympians, {
x: "weight",
y: "height",
fill: "sex",
opacity: 0.5
}),
Plot.ruleX([30]),
Plot.ruleY([1.2]),
() =>
svg`<g transform="translate(400,270)">${Plot.rectY(
olympians,
Plot.binX({ y: "count" }, { x: "weight", fill: "sex" })
).plot({
axis: null,
x: { domain: [180, 20] },
height: 200,
width: 400
})}`
]
})