Plot.plot({
marginLeft: 160,
y: { ticks: 0, label: null, tickFormat: null, tickSize: 0 },
marks: [
Plot.barX(data, {
x: "iq",
y: "region",
fill: "region",
sort: { y: "x", reverse: true }
}),
Plot.text(data, {
x: 0,
y: "region",
text: "region",
textAnchor: "start",
dx: 5
}),
Plot.text(data, {
x: "iq",
y: "region",
text: "iq",
textAnchor: "end",
dx: -5
})
]
})