Public
Edited
Apr 30
Insert cell
Insert cell
Insert cell
dichoData1 = dichoData.filter(d => d["Participant Id"] != 2)
Insert cell
Insert cell
Plot.plot({
width: 350,
height: 230,
marginTop: 0,
x: {domain: [0, 1], label: "Opacity"},
y: {grid: true, domain: d3.groupSort(orderedId, ([d]) => d.span, (d) => d["Participant Id"])},
symbol: {legend: true, range:["circle", "cross", "square2"], fill: "black"},
color: {legend: true, scheme: "tableau10"},
marks: [
// Plot.axisY({sort: {y: "x", reduce: "min", order: "ascending"}}),
Plot.link(dichoData1.filter(x => x.Condition === "dichoptic"),
Plot.groupY(
{x1: "min", x2: "max"},
{y: "Participant Id", x1: "Transparency", x2: "Transparency", stroke: "Condition", sort: {y: "x1", reverse: true}}
)
),
Plot.dot(dichoData1.filter(x => x.Condition === "dichoptic"),{x: "Transparency", y: "Participant Id", symbol: "Eye", fill: "Condition"}),
Plot.linearRegressionX(dichoData1.filter(x => x.Condition === "non-dichoptic"), {x: "Transparency", y: "Participant Id", stroke: "Condition"}),
Plot.dot(dichoData1.filter(x => x.Condition === "non-dichoptic"),{x: "Transparency", y: "Participant Id", symbol: "Eye", fill: "Condition"})
]
})
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