Plot.plot({
color: {
legend: true,
...(colorType === "ordinal"
? {
range: [
"green",
"purple",
"orange",
"yellow",
"blue",
"pink",
"brown",
"grey",
"green",
"lavender"
]
}
: { scheme: "blues" })
},
marks: [
Plot.dot(diamonds, {
x: "depth",
y: "table",
stroke: col,
tip: true,
channels: { Color: "color", Clarity: "clarity" }
})
],
grid: true
})