Plot.plot({
fx: { axis: null },
fy: { axis: null },
color: { legend: true },
marks: [
Plot.boxY(data, {
fx: (d) => fx(d["Major Genre"]),
fy: (d) => fy(d["Major Genre"]),
y: (d) => +d["Production Budget"],
x: "MPAA Rating",
fill: "MPAA Rating"
}),
Plot.text(genres, { fx, fy, frameAnchor: "top-left", dx: 6, dy: 10 })
]
})