Public
Edited
Jan 5
6 stars
Insert cell
Insert cell
Insert cell
Insert cell
scale1 = d3.scaleSequential()
.domain([0, 100])
.interpolator(d3.interpolateBlues)
Insert cell
Insert cell
Insert cell
scale2 = d3.scaleSequential()
.domain([0, 100])
.interpolator(d3.interpolateRgbBasis(d3.schemeBlues[9]))
Insert cell
Insert cell
d3.schemeBlues[9]
Insert cell
Insert cell
scale3 = d3.scaleSequential()
.domain([0, 100])
.interpolator(d3.interpolateRgbBasis(d3.schemeBlues[9].slice(2)))
Insert cell
Insert cell
Insert cell
legend({ color: scale1 })
Insert cell
legend({ color: scale2 })
Insert cell
legend({ color: scale3 })
Insert cell
legend({ color: scale4 })
Insert cell
scale4 = d3.scaleDiverging()
.domain([-100, 0, 100])
.interpolator(d3.interpolateRgbBasis([
...d3.schemeBlues[9].slice(2).reverse(),
...d3.schemeReds[9].slice(2)
]))
.unknown('lightgray')
Insert cell
Insert cell
Insert cell
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