colorLegend = Plot.plot({
marks: [
Plot.dot(countries, {
x: "income",
y: "lifeexp",
fill: "continent",
r: "population",
stroke: "black",
strokeWidth: 1
})
],
x: {type: "log", grid: true, ticks: 3, label: "Income (GDP/capita) →"},
y: {grid: true, ticks: 4, domain: [50, 85], label: "↑ Life expectancy (years)"},
color: {legend: true, range: ["#FF265C", "#FFE700", "#4ED7E9", "#70ED02", "purple"]}
})