Public
Edited
Oct 14, 2024
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Plot.plot({
marks: [
Plot.barX(alphabet, {
x: "frequency",
y: "letter"
})
]
})
Insert cell
Insert cell
Insert cell
Plot.plot({
marks: [Plot.barX(alphabet, { x: "frequency", y: "letter", fill: "letter" })]
})
Insert cell
Insert cell
Plot.plot({
color: {
range: ["pink", "orange", "lightblue"]
},
marks: [Plot.barX(alphabet, { x: "frequency", y: "letter", fill: "letter" })]
})
Insert cell
Insert cell
Insert cell
Plot.plot({
color: {
range: ["blue", "red"]
},
marks: [
Plot.barX(alphabet, {
x: "frequency",
y: "letter",
fill: "frequency"
})
]
})
Insert cell
Insert cell
Insert cell
Plot.plot({
marks: [
Plot.barX(alphabet, {
x: "frequency",
y: "letter",
fill: (d) => (d.frequency > 0.08 ? "red" : "blue")
})
]
})
Insert cell
Insert cell
Plot.plot({
marks: [
Plot.barX(alphabet, {
x: "frequency",
y: "letter",
fill: (d) => (/[aeiouy]/i.test(d.letter) ? "#44a" : "#ccc")
})
]
})
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
myAlphabet
X
frequency
Y
letter
Color
letter
Size
Facet X
Facet Y
Mark
bar
Type Chart, then Shift-Enter. Ctrl-space for more options.

Insert cell
Insert cell
myAlphabet = alphabet
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
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