Plot.plot({
width: 928,
height: 500,
x: {label: null},
y: {tickFormat: "s", tickSpacing: 50},
color: {scheme: "Spectral", legend: "ramp", width: 340, label: "Age (years)"},
marks: [
Plot.barY(tidy, {
x: "state",
y: "population",
fill: "age",
sort: {color: null, x: "-y"}
})
]
})