Unlisted
Edited
Jun 17, 2024
Insert cell
Insert cell
Plot.plot({
width: 500,
aspectRatio: 1,
axis: null,
inset: 30,
marks: [
Plot.line(d3.range(1000), {
x: (i) => i * Math.sin(i / 200 + ((i % 5) * 2 * Math.PI) / 5),
y: (i) => i * Math.cos(i / 200 + ((i % 5) * 2 * Math.PI) / 5),
stroke: (i) => `arrow ${i % 5}`,
strokeWidth: (i) => i / 200
}),
Plot.line(d3.range(1000), {
x: (i) => i * Math.sin(i / 200 + ((i % 5) * 2 * Math.PI) / 5),
y: (i) => i * Math.cos(i / 200 + ((i % 5) * 2 * Math.PI) / 5),
stroke: (i) => `arrow ${i % 5}`,
strokeWidth: (i) => (i < 990 ? 0 : 5),
markerEnd: "arrow"
})
]
})
Insert cell
Plot.plot({
width: 500,
aspectRatio: 1,
axis: null,
inset: 30,
marks: [
Plot.line(d3.range(100), {
x: (i) => i * Math.sin(i / 20 + ((i % 5) * 2 * Math.PI) / 5),
y: (i) => i * Math.cos(i / 20 + ((i % 5) * 2 * Math.PI) / 5),
stroke: (i) => `arrow ${i % 5}`,
strokeWidth: (i) => i / 20,
markerEnd: "arrow"
})
]
})
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