Plot.plot({
marks: [
Plot.dot(cars, {x: "weight (lb)", y: "power (hp)", fill: "currentColor", fillOpacity: 0.2}),
Plot.dot(cars.slice(0, m), {x: "weight (lb)", y: "power (hp)"}),
Plot.linearRegressionY(cars.slice(0, m), {x: "weight (lb)", y: "power (hp)", stroke: "red"})
]
})