Plot.plot({
width: 928,
height: 800,
x: {label: "State", tickRotate: -45, tickFontSize: 10},
y: {label: "Missing Values", tickFormat: "s", tickSpacing: 50},
color: {scheme: "Spectral", legend: true, label: "Year"},
marks: [
Plot.barY(tidy, {
x: "state",
y: "missing_values",
fill: "year"
})
]
})