Plot.plot({
marks: [
Plot.barY(seattle, Plot.groupX({y: "mean"}, {x: d => d.date.getUTCMonth(), y: "precipitation"})),
Plot.ruleY(seattle, Plot.groupZ({y: "mean"}, {y: "precipitation", stroke: "red"}))
],
x: {tickFormat: Plot.formatMonth()},
y: {grid: true}
})