Unlisted
Edited
May 9, 2023
Insert cell
Insert cell
data =[
{name: 'run' ,
data: [{time: 0, rank: 0}, {time:1, rank:1}, {time:2, rank:2}, {time:3, rank:3}]
},
{name: 'walk' ,
data: [{time: 2, rank: 0}, {time:3, rank:1}, {time:4, rank:2}, {time:5, rank:3}]
},
{name: 'float' ,
data: [{time: 6, rank: 0}, {time:5, rank:1}, {time:6, rank:2}, {time:7, rank:3}]
}
]
Insert cell
data[0].data
Insert cell
Plot.plot({
x: {
label: null
},
y: {
grid: true,
},
marks: [
Plot.ruleY([0]),
Plot.line(data[0].data, {
x: 'time',
y: 'rank',
stroke: "red"
}),
Plot.line(data[1].data, {
x: 'time',
y: 'rank',
stroke: "blue"
}),
Plot.line(data[2].data, {
x: 'time',
y: 'rank',
stroke: "gold"
})
]
})
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