Plot.plot({
marginRight: 60,
marginLeft: 60,
y: {
grid: true,
label: "Pace",
reverse: true,
},
marks: [
Plot.ruleY([0]),
Plot.lineY(data, {x: "Day Number", y: "Pace (mi)", stroke: "Type"}),
Plot.text(data, Plot.selectLast({x: "Day Number", y: "Pace (mi)", z: "Type", text: "Type", textAnchor: "start", dx: 3}))
]
})