Plot.plot({
x: { grid: true, label: "Time (seconds)" },
y: { label: "Metric" },
marks: [
Plot.barX(data, { x: "new", y: "stat", fill: "#ccc" }),
Plot.ruleX([0]),
Plot.tickX(data, { x: "new", y: "stat", strokeWidth: 1.5 }),
Plot.arrow(data, { x1: "old", x2: "new", y: "stat", stroke: "red" }),
Plot.dot(data, { x: "old", y: "stat", fill: "red" })
]
})