Public
Edited
Mar 16, 2024
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
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
})
Insert cell
Insert cell

Purpose-built for displays of data

Observable is your go-to platform for exploring data and creating expressive data visualizations. Use reactive JavaScript notebooks for prototyping and a collaborative canvas for visual data exploration and dashboard creation.
Learn more