Plot.plot({
grid: true,
inset: 10,
marginLeft: 100,
color: {
legend: true
},
x: {
domain: [0, 20]
},
y: {
domain: [0, 1500000]
},
marks: [
Plot.dot(selectedSales, {
x: "transportationDistanceMins",
y: "pricePerFloor",
stroke: "area"
}),
Plot.dot(selectedComparedProperties, {
x: (p) => p.transportationDistanceMeter / 80,
y: "pricePerFloor",
stroke: "#000"
}),
Plot.linearRegressionY(selectedSales, {
x: "transportationDistanceMins",
y: "pricePerFloor",
stroke: "area",
ci: 0.95
}),
Plot.linearRegressionY(selectedComparedProperties, {
x: (p) => p.transportationDistanceMeter / 80,
y: "pricePerFloor",
stroke: "#000",
ci: 0.95
})
]
})