Authors_plot = Plot.plot({
height: 800,
width: 1000,
marginBottom: 150,
marginTop: 30,
marginRight: 50,
marginLeft: 50,
color: {
scheme: "Warm",
reverse: true
},
x: {
tickRotate: 45,
label: null,
domain: auteurs_50etPlus.sort((a, b) => d3.descending(a.Count, b.Count)).map(
(d) => d.auteurs
)
},
y: {
grid: true,
nice: true,
label: "Nombre d'exemple"
},
marks: [
Plot.barY(
auteurs_50etPlus,
{
y: "Count",
x: "auteurs",
fill: "auteurs",
order: (a, b) => d3.descending(a.Count, b.Count),
title: (d) => `${d.auteurs}: ${d.Count} exemples dans la base`
}
),
Plot.ruleY([0])
]
})