Plot.plot({
x: { axis: null },
y: { axis: null },
r: { type: "linear", range: [0, r] },
width: width,
height: width * 0.5625,
marks: [
Plot.dot(
[
[-1, 0],
[1, 0],
[0, -1],
[0, 1]
],
{ x: (d) => d[0], y: (d) => d[1], r: 0 }
),
...Array(2)
.fill()
.map((_, i) =>
Plot.dot(
Array(ncircles)
.fill()
.map((_, i) => i),
{
x: i ? x : -x,
y: i ? y : -y,
r: (d) => d,
strokeWidth: 2,
stroke: "rgba(0,0,0,1)"
}
)
)
]
})