Plot.dot(
{ length },
{
...Plot.bin(
{
data: (d) => d.length,
r: "count",
thresholds: 14
},
{ x: xn, y: yn, stroke: "white", strokeWidth: 0.75, fill: "steelblue" }
),
sort: sort2 ? (d) => d : false,
reverse: reverse2
}
).plot({
width: 400,
height: 400,
x: { ticks: 10, inset: 15 },
y: { ticks: 10, inset: 15 },
grid: true
})