Published
Edited
May 4, 2021
3 stars
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
plot = (params, interpolator, xDomain, yDomain) =>
densityPlot(
pointDensity(width, width)
.xDomain(xDomain)
.yDomain(yDomain)
.batchSize(1e5)
)
.color(buf => d3.scaleSequentialLog([1, d3.max(buf) / 2], interpolator))
.background('#fff')
.drawAxes(false)(
cliffordOrbit(numPoints, 0, 0, params.a, params.b, params.c, params.d)
)
Insert cell
loop = {
let i = 0.8;
let direction = "up";
while (true) {
await Promises.delay(d3.randomUniform(400, 2200)());
if (i > 1.9) {
direction = "down";
} else if (i < 0.8) {
direction = "up";
}
i = direction === "up" ? i + 0.1 : i - 0.1;
yield i;
}
}
Insert cell
Insert cell
numPoints = 10000000
Insert cell
comma = d3.format(',')
Insert cell
d3 = require('d3@6')
Insert cell
import { html } from '@observablehq/htl'
Insert cell
import {
densityPlot,
pointDensity,
cacheInterpolator
} from '@twitter/density-plots@4159'
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