Plot.plot({
height: 640,
width: 750,
padding: 0.05,
grid: true,
x: {
axis: "top",
label: "Season"
},
y: {
label: "Episode"
},
color: {
type: "linear",
scheme: "PiYG"
},
marks: [
Plot.cell(simpsons, {
x: "season",
y: "number_in_season",
fill: "imdb_rating",
}),
Plot.text(simpsons, {
x: "season",
y: "number_in_season",
text: d => d.imdb_rating?.toFixed(1),
title: "title"
})
]
})