Published
Edited
Jun 4, 2021
17 stars
Insert cell
Insert cell
Insert cell
Insert cell
Plot.plot({
inset: 10,
x: { axis: null },
y: { axis: null },
r: { range: [1, 3.5] },
marks: [
Plot.link(data, {x1: "x1", y1: "y1", x2: "x2", y2: "y2", strokeWidth: 0.25}),
Plot.dot(data, { z: "y2", x: "x1", y: "y1", fill: "color", r: d => 1 - d.y1}),
Plot.dot(data, { z: "y1", x: "x2", y: "y2", fill: "color", r: d => 1 - d.y2 + h}),
],
width: 600,
height: 600
})
Insert cell
h = 10 * (beta - 1) / (beta + 1e-6)
Insert cell
data = {
const n = 83;
const a = alpha * Math.PI;
return Array.from({length: n}, (_,i) => {
const t = i * 2 * Math.PI / n;
return ({
color: t,
x1: Math.cos(t + a),
y1: Math.sin(t + a),
x2: Math.cos(t - a),
y2: Math.sin(t - a) + h
});
});
}
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