Plot.plot({
x: {
nice: true,
ticks: 20,
tickFormat: (d) =>
d === Math.floor(d) ? d3.format("~s")(Math.pow(10, d)) : "•",
label: "sample size (log scale) →"
},
marks: [
Plot.rectY(
data,
Plot.binX(
{
y: "count",
title
},
{
x: (d) => Math.log10(d || NaN),
fill: "orange"
}
)
),
Plot.tickY([0])
]
})