Plot.plot({
marginLeft: 60,
marginRight: 40,
x: {
grid: true,
label: "Message Counts",
type: "log",
transform: d => Math.max(d, 1),
domain: [1e0, 1e4],
},
y: {
type: "band",
label: "Destinations"
},
marks: [
Plot.barX(data, Plot.groupY({x: d => d.length}, {y: "dest", sort: {y: "x", reverse: true}}))
]
})