Plot.plot({
marks: [
Plot.dot(crabsJS, {x: "lat", y: "sizeMm", fill: "steelblue", opacity: 0.6, r: 4}),
Plot.dot(crabsJS, Plot.groupX({ y: "mean" }, { x: "lat", y: "sizeMm", tip: true, fill: "orange", symbol: "square", r: 4})),
Plot.linearRegressionY(crabsJS, {x: "lat", y: "sizeMm"}),
Plot.frame()
],
x: {label: "Latitude (degrees)", domain: [28, 44]},
y: {label: "Carapace size (millimeters)", domain: [5, 25], ticks: 5, grid: true}
})