Plot.plot({
width,
height: 30,
x: {axis: null},
marks: [
Plot.barX(data, { x: Plot.identity, inset: 1 }),
Plot.dot(
data,
Plot.filter(d => d > a, Plot.stackX({ x: Plot.identity, r: 9, fill: "white" }))
),
Plot.text(
data,
Plot.filter(d => d > a, Plot.stackX({ x: Plot.identity, text: (d, i) => i }))
)
]
})