mypLot = Plot.plot({
marginLeft: 60,
x: { label: "Laboratory", axis: null },
y: { label: "Activity concentration (Bq/L)", grid: true },
color: { legend: true },
facet: { data: dataSelected, x: "exercise", interval: 1 },
marks: [
Plot.barY(dataSelected, { x: "lab", y: "activity", fill: "lab" }),
Plot.link(dataSelected, {
y1: (d) => (!isNaN(d.activity) ? d.activity + d.uncertainty : d.DL),
y2: (d) => (!isNaN(d.activity) ? d.activity - d.uncertainty : 0),
x1: "lab",
x2: "lab"
})
]
})