Plot.plot({
x: { label: 'Frequency', reverse: true, domain: [0, 4000] },
y: { label: 'Intensity', },
marks: [
Plot.ruleY([0]),
Plot.rect(ir, {x1: d => d.x - range / 2, x2: d => d.x + range / 2, y1: 1, y2: d => 1 - d.y, fill: '#ccc' }),
Plot.lineY(line, {x: 'x', y: 'y', stroke: 'rebeccapurple', strokeWidth: 2 })
]
})