{
let plt,
{ newTree } = pt;
newTree.map((d) => (d._x = d.x - Math.pow(2, d.y - 1)));
plt = Plot.plot({
x: { nice: true, type: "symlog" },
y: { nice: true },
color: { legend: true, scheme: "Blues" },
marks: [
Plot.link(
newTree.filter((d) => d.left),
{
x1: "_x",
y1: "y",
x2: (d) => newTree[d.left]._x,
y2: (d) => newTree[d.left].y
}
),
Plot.link(
newTree.filter((d) => d.right),
{
x1: "_x",
y1: "y",
x2: (d) => newTree[d.right]._x,
y2: (d) => newTree[d.right].y
}
),
Plot.dot(newTree, {
x: "_x",
y: "y",
tip: true,
fill: "orange",
stroke: "y",
r: 10
}),
Plot.text(newTree, {
x: "_x",
y: "y",
text: "v"
})
]
});
return plt;
}