Plot.plot({
grid: true,
x: {
label: "Miles driven (per capita per year) →"
},
y: {
label: "↑ Price of gas (average per gallon, adjusted)"
},
marks: [
Plot.line(driving, {x: "miles", y: "gas", curve: "catmull-rom"}),
Plot.dot(driving, {x: "miles", y: "gas", fill: "currentColor"}),
Plot.text(driving, {filter: d => d.year % 5 === 0, x: "miles", y: "gas", text: "year", dy: -8})
]
})