Plot.plot({
style: {fontFamily: "Lato"},
y: {
grid: true,
label: "↑ Frequency (%)",
transform: (d) => d * 100
},
marks: [
Plot.barY(alphabet, { x: "letter", y: "frequency" }),
Plot.text(alphabet, {
x: "letter",
y: "frequency",
text: (d) => (d.frequency * 100).toFixed(1),
dy: -5
}),
Plot.ruleY([0])
]
})