Plot.plot({
width: 1000,
x: { padding: 0.25, label: "Species" },
y: {
grid: true,
tickFormat: (m) => `${d3.format(",")(m)} g`,
label: "↑ Average Mass"
},
marks: [
Plot.barY(penguin_data, {
x: "species",
y: "avg_mass",
fill: "steelblue",
stroke: "black",
marginLeft: 50
}),
Plot.ruleY([0])
]
})