{
const select = data.slice(selectIdx, selectIdx + 1),
neighbors = [
data[obj.twoNeighbors[selectIdx].a],
data[obj.twoNeighbors[selectIdx].b]
];
return Plot.plot({
aspectRatio: 1.0,
color: { legend: true, scheme: "Blues" },
x: { nice: true },
y: { nice: true },
marks: [
Plot.dot(data, { x: "x", y: "y", fill: "gray", opacity: 0.5 }),
Plot.dot(select, { x: "x", y: "y", fill: "red" }),
Plot.dot(neighbors, { x: "x", y: "y", fill: "blue" }),
Plot.frame()
]
});
}