Public
Edited
Feb 12
Insert cell
Insert cell
Plot.plot({
height: 800,
marginRight: 90,
marginLeft: 110,
grid: true,
x: {nice: true},
y: {inset: 5},
color: {type: "categorical"},
marks: [
Plot.frame(),
Plot.dot(barley, {
x: "start",
y: "ae",
fy: "subject",
stroke: "ae",
sort: {y: "x", fy: "x", reduce: "median"}
})
]
})
Insert cell
barley = [
{subject: 1, ae: 'a', start: 1, end: 5},
{subject: 1, ae: 'a', start: 1, end: 5},
{subject: 1, ae: 'a', start: 1, end: 5},

{subject: 1, ae: 'b', start: 1, end: 5},
{subject: 1, ae: 'b', start: 1, end: 5},
{subject: 1, ae: 'b', start: 1, end: 5},

{subject: 2, ae: 'a', start: 1, end: 5},
{subject: 2, ae: 'a', start: 1, end: 5},
{subject: 2, ae: 'a', start: 1, end: 5},
]
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