Public
Edited
Jun 14, 2023
Insert cell
Insert cell
data = (() => {
const a = [0.4, 0.6];
let a1 = a;
for (let i = 1; i < 2; i++) {
a1 = a1.flatMap((x) => a.map((y) => x * y));
}
return a1;
})()
Insert cell
Plot.plot({
marks: [Plot.ruleY([0]), Plot.line(data, { x: (x, i) => i, y: (x) => x })]
})
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