Plot.plot({
marginLeft: 90,
color: { scheme: "Dark2", legend: true, style: { fontSize: "1em" } },
x: { percent: true },
marks: [
Plot.barX(
congress,
Plot.groupY(
{ x: "count" },
{
fill: "party",
y: "gender",
sort: { y: "x", reverse: true, color: "width" },
offset: "normalize"
}
)
)
],
style: {fontSize: fontSize + "em" },
marginBottom: marginBottomEstimate
})