Public
Edited
Aug 14, 2023
Fork of IR Result
1 fork
Insert cell
Insert cell
Insert cell
Plot.plot({
x: { label: 'Frequency', reverse: true, domain: [0, 4000] },
y: { label: 'Intensity', },
marks: [
Plot.ruleY([0]),
Plot.rectY(ir, {x1: d => d.x - range / 2, x2: d => d.x + range / 2, y: 'y', fill: 'rebeccapurple' }),
]
})
Insert cell
Insert cell
index = FileAttachment("index.json").json()
Insert cell
Insert cell
ir = {

const data = []
const {ir} = index.reports[0].results

for (let i = 0; i < ir.frequencies.data.length; ++i) {
const x = ir.frequencies.data[i]
const y = ir.intensities.data[i]

data.push({x,y})
}

return data
}
Insert cell

Purpose-built for displays of data

Observable is your go-to platform for exploring data and creating expressive data visualizations. Use reactive JavaScript notebooks for prototyping and a collaborative canvas for visual data exploration and dashboard creation.
Learn more