Public
Edited
Nov 24, 2023
4 stars
Insert cell
Insert cell
data = Array.from({ length: 100 }, d3.randomLcg(42))
Insert cell
plot = Plot.tickX(data, { stroke: Plot.identity }).plot({
color: { type: "quantile", n: 5 }
})
Insert cell
plot.scale("color")
Insert cell
plot.legend("color") // the ticks are "wrong"
Insert cell
plot.legend("color", { tickFormat: ".2f" }) // fixed
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