Published unlisted
Edited
May 10, 2022
Insert cell
Insert cell
d3 = require("d3@^6")
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
// Make xScale to evenly space columns
xScale = d3.scalePoint()
.domain(particleCol)
.range([20, width / 2 - 50 ])
Insert cell
//Make yScale to evenly space rows
yScale = d3.scalePoint()
.domain(particleRow)
.range([height / 2 - margin.top + 5, (height/2) - margin.bottom + 55])
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