Plot.plot({
x: {label: null},
y: {percent: true},
marks: [
Plot.barY(
pyramide_ages,
{x: "AGED", y: d => d.individus/1000, fill: "departement", fy: "departement", tip: true}
),
Plot.ruleX([18], {stroke: "red"}),
Plot.tickY(
pyramide_ages,
{x: "AGED", y: d => d.individus/1000, fy: "departement"}
),
Plot.ruleY([0]),
Plot.axisY({label: "Population (en milliers)"}),
Plot.axisX({ticks: d3.ticks(0, 120, 10), label: "Âge", fontSize: 12})
]
})