Published
Edited
Aug 4, 2022
2 stars
Insert cell
Insert cell
Plot.plot({
height: 600,
color: { type: "categorical" },
facet: { data: barley, y: "site" },
marks: [
Plot.frame(),
Plot.dot(barley, { x: "yield", y: "variety", stroke: "year" })
]
})
Insert cell
Insert cell
Plot.plot({
marginLeft: 110,
marginRight: 90, // ← won't help facet labels
height: 600,
color: { type: "categorical" },
facet: { data: barley, y: "site" },
marks: [
Plot.frame(),
Plot.dot(barley, { x: "yield", y: "variety", stroke: "year" })
]
})
Insert cell
Insert cell
Plot.plot({
height: 600,
marginLeft: 110,
color: { type: "categorical" },
facet: { data: barley, y: "site", marginRight: 90 }, // ← gives facet labels more space
marks: [
Plot.frame(),
Plot.dot(barley, { x: "yield", y: "variety", stroke: "year" })
]
})
Insert cell
Insert cell
import {barley} from "@observablehq/plot-facets"
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