Published unlisted
Edited
May 23, 2021
Insert cell
Insert cell
Plot = require(await FileAttachment("plot@1.umd.js").url())
Insert cell
import { mobydick as letters } from "@observablehq/plot-group"
Insert cell
Plot.dot(letters, { x: (d) => d, r: Math.random }).plot({ x: { sort: null } })
Insert cell
Plot.dot(letters, { x: (d) => d, r: Math.random }).plot({ x: { sort: "ascending" } })
Insert cell
Plot.dot(letters, { x: (d) => d, r: Math.random }).plot({
x: { sort: "count" }
})
Insert cell
Insert cell
Plot.barY(letters, Plot.groupX({ y: "count" }, { x: letters })).plot({
x: { sort: "count", reverse: true },
marks: [Plot.dot(letters, { x: letters, y: () => undefined })]
})
Insert cell
import { data } from "@observablehq/plot-exploration-penguins"
Insert cell
Plot.plot({
facet: {
data,
x: "sex",
y: "species",
marginLeft: 80
},
fx: { sort: "count", reverse: true },
fy: { sort: "count", reverse: true },
marks: [
Plot.frame(),
Plot.dot(data, {
x: "body_mass",
y: "flipper_length",
fill: "island"
})
]
})
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