Plot.plot({
marks: [
Plot.barX(olympians, Plot.groupY({x2: "count"}, {x1: 300, y: "nationality", sort: {y: "x", reverse: true, limit: 10},
fill: d => d.nationality === "USA" ? "steelblue" : (d.nationality === "ESP" ? "red" : "lightgray")})),
Plot.ruleX([300])
],
x: {
domain: [300, 570]
},
marginLeft: 50, width
})