Unlisted
Edited
Mar 20, 2024
Insert cell
Insert cell
data = d3.csvParse(`frequency,score,side
1000,1,gauche
3000,5,gauche
4000,8,gauche
500,1,droite
750,10,droite
1000,1,droite
`, d3.autoType)
Insert cell
Plot.plot({
y: { grid: true },
x: {
type: "log",
base: 2,
domain: [125, 8000],
ticks: [125, 250, 500, 1000, 2000, 4000, 8000],
},
marks: [
Plot.ruleX(data, {
x: "frequency",
y: "score",
fx: "side",
strokeWidth: 2,
}),
Plot.dot(data, {
x: "frequency",
y: "score",
fx: "side",
r: 8,
fill: "side",
}),
]
});
Insert cell
Plot.plot({
y: { grid: true },
x: {
type: "log",
base: 2,
ticks: [125, 250, 500, 1000, 2000, 4000, 8000],
},
marks: [
Plot.ruleX(data, {
x: "frequency",
y: "score",
fx: "side",
strokeWidth: 2,
}),
Plot.dot(data, {
x: "frequency",
y: "score",
fx: "side",
r: 8,
fill: "side",
}),
]
});
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