Plot.plot({
width,
color: { legend: true },
facet: {
data: olympians,
x: "sport",
y: "sex"
},
marks: [
Plot.frame(),
Plot.dot(olympians, {
x: "date_of_birth",
y: "height",
stroke: "sport",
strokeOpacity: 0.5,
title: "name"
}),
Plot.linearRegressionY(olympians, { x: "date_of_birth", y: "height" })
]
})