Public
Edited
Apr 1
3 stars
Insert cell
Insert cell
Insert cell
Insert cell
chart = Plot.plot({
insetTop: 10,
insetBottom: 10,
width,
y: { domain: [-1, 1] },
clip: true,
marks: [
Plot.frame(),
Plot.lineY(data, { x: "x", y: "y", strokeWidth: "x", opacity })
]
})
Insert cell
data = d3
.range(0, Math.PI * 4, ((Math.PI * 4) / width) * density)
.map((x) => ({ x, y: Math.sin(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